Databinding to a list

E

Eskimo

Hi,

I have extended System.Collections.CollectionBase to hold an object that I
wrote.
When I databind to a radio button list and select one of the displayed values
and initiate a postback I expected

System.Diagnostics.Trace.WriteLine("Selected Item: " +
RadioButtonList1.SelectedItem);

System.Diagnostics.Trace.WriteLine("Selected Value: " +
RadioButtonList1.SelectedValue);

to display values.

Help!

p.s.
the populate code in page_load event:
....
RadioButtonList1.DataTextField = "FIELD I WANT TO SHOW";
RadioButtonList1.DataValueField = "FIELD VALUE I NEED";
RadioButtonList1.DataSource = <Extended list object>;
RadioButtonList1.DataBind();
....

tym, Eskimo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top