Click here to Skip to main content
14,922,630 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one webpage that contains two dropdownlists and few other controls.
when i select value in one dropdownlist then other dropdownlist will be binding from database based on first dropdownlist selected,when i selecting dropdownlist total page is postbacking so,how to prevent that total page postback.

You can put your code in ajax update panel.

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
      //your html
Either use Ajax update panel or bind the dropdown list using Classic ajax method.
place all the dropdownlist which are firing a post back event in updatepanel's content tempalte field control of ajax.
for example refer
<asp:scriptmanager enablepartialrendering="true" xmlns:asp="#unknown">
 ID="ScriptManager1" runat="server"></asp:scriptmanager>
 <asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
 UpdateMode="Conditional"> <contenttemplate>
  <asp:dropdownlist id="NetworkCodeDropDown" autopostback="true" onselectedindexchanged="DropDown_Changed" runat="server"> </asp:dropdownlist>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900