Problem with DropDownList

  • Thread starter Thread starter Jensen bredal
  • Start date Start date
J

Jensen bredal

i created a dropdownlist and
bound it to a table the following way.


MyList.DataSource = DS.Tables[0];
MyList.DataValueField = "testid";

MyList.DataTextField = "text";



the problem is that , when an item get selected

all my methods to retriev the id of the

selecteditem fails.



How show i get the value when a submit

button is pressed on the page?



Many thanks in advance



JB
 
Perhaps, you have not set the view state. Take a look at
Control.EnableViewState property in doc.
 

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

Back
Top