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.
 
Back
Top