Click to See Complete Forum and Search --> : drop down list not saving state on postback


bjswift
October 26th, 2005, 10:15 AM
I have a drop down list that I have tried both ways populating in design time, and at run time. When I make a selection and run a function which uses the values of the DDL box, the drop down list returns back to the index of 0, and does not save the sate to the index that I choose to run the function.

I made sure that the enableViewState property is set to TRUE. There is no other code that manipulates this control either. Any ideas???

mmetzger
October 26th, 2005, 11:36 AM
Try looking at your Page_Load method. It sounds like it's resetting the contents on every load.

bjswift
October 26th, 2005, 01:58 PM
Sorry, all of the code on page load is within a
IF not page.ispostback statement, so I'm pretty sure that nothing in that code block will get executed.

I however, have solved the problem, and eliminated the drop down list box, and no longer using it for the first intended purpose. Thanks for your feedback!