Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,

I've implemented nearly 5 DDL in single page..if I click one DDL values based on that I'll bind the values in remaining other DDL's..
my prob is when i click one DDL its post backing the whole page..how to control this..even I'm not able to use JavaScript for this because based on one DDL value only I'm binding other DDL values...can one help me..

i want to stop the whole page refresh..
Posted
Comments
Surendra0x2 9-Mar-13 2:14am    
Place Dropdownlists Inside Update panel :)

AutoPostBack="false"
 
Share this answer
 
Hello ,

You can use the update panel control like below ..

ASP.NET
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
   </asp:scriptmanager>
   <asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
       <contenttemplate>
           <asp:dropdownlist runat="server">
           </asp:dropdownlist>
           <asp:dropdownlist runat="server">
           </asp:dropdownlist>
       </contenttemplate>
   </asp:updatepanel>


and if you want use javascript then use
ASP.NET
<asp:dropdownlist runat="server" autopostback="false" onselectedindexchanged="" xmlns:asp="#unknown">
            </asp:dropdownlist>
 
Share this answer
 
Hello ,

If you set AutopostBack as false, the Selected Index changed event for the DDL won't get executed.

Let me know you full prob statement.

Regards
Himanshu
 
Share this answer
 

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