C# .NET - how to stop asp.net get blinking if i give dropdownlist postback=true?
Asked By Giri s on 26-Jun-12 09:44 AM
in my asp.net web page get blinking after i gave dropdownlist postback=true..how to stop that blinking if i give dropdownlist postback=true(its must for my pag)??????
Jitendra Faye replied to Giri s on 26-Jun-12 09:51 AM
Use UpdatePanel like this-
<asp:UpdatePanel ID="updBeerCat" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList2" runat="server" OnTextChanged="drp_SelectedIndexChanged"
OnSelectedIndexChanged="drp_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem>1 </asp:ListItem>
<asp:ListItem>2 </asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
Vikram Singh Saini replied to Giri s on 26-Jun-12 09:11 PM
Your problem appears somewhat same as http://www.eggheadcafe.com/community/asp-net/17/10460532/user-controls-dropdown-causing-full-postback-inside-updatepanel.aspx
So in that case I would recommend you to register the dropdownlist control as asyncpostback control in Page_Load as:
scriptManager.RegisterAsyncPostBackControl(dropdownlistID);
Let us know if it helped or not.