I am using VS 2008, VB and using a dorpdown listbox in my asp.net webpage. I select a value from the dropdown, click the submit button, when the page comes back from the server, the value in the dropdown is blank (default). The dropdown controls viewstate is enabled.
The code for the submit button is:
<asp:Button ID开发者_JS百科="ButtonSubmit" runat="server" Text="Submit" CssClass="Button" />
The dropdownlist code is:
What am I missing here?
are you binding dropdown in page_load event? If yes move that code in
if(!page.isPostback)
{
binddropdown();
}
精彩评论