Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two update panel, and each have a textbox and also have the two button.
i want to click button1 then update panel1 should be refresh with it's textbox value. and when click on button2 then update panel2 should be refresh with it's value. using ajax in asp.net. how can i do this.
Posted
Comments
syed shanu 1-Dec-14 1:15am    
Check this link hope this will help you.
http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.update(v=vs.110).aspx
Jignesh Khant 1-Dec-14 1:37am    
Instead of button use timers to update update panels by calling function on timer tick.
Sinisa Hajnal 1-Dec-14 2:15am    
Avoid timers if you can, they'll update the panel whether you need it or not and could update in the middle of users input. Buttons or textbox events are fine. There are plenty of examples that are easily googled.

1 solution

set the update mode to conditional.
C#
<asp:updatepanel id=""UpdatePanel1"<br" mode="hold" xmlns:asp="#unknown" />                  UpdateMode="Conditional"
                  runat="server">



and on the button click write the code when ever you want to update the UpdatePanel

C#
UpdatePanel1.Update();
 
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