开发者

asp.net dropdown listbox not holding viewstate

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();
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜