Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DropDownList initialization question
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00900902
Message ID:
00900962
Views:
31
>Kevin,
>
>I have another related question...
>My form has several DropDownLists on it. I want to populate them from tables, as I think I mentioned...

Richard, make sure you only do the below code when the form is first loaded, and not on a post back. If you do it on a postback it looses the currently selected setting. Wrap your populate code with:

if (! IsPostBack)
{
// This code only runs the FIRST time your page loads

...Code to get your data and bind to the combos...
}

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform