All updatepanel are getting updated when i perform updation in first updatepanel

Posted by Suraj1.Niit under ASP.NET AJAX on 1/28/2014 | Points: 10 | Views : 1274 | Status : [Member] | Replies : 1
I've two updatepanel on my page. When I click on button inside first updatepanel the second updatepanel is getting updated.


Posted by: kgovindarao523-21772 on: 1/28/2014 [Member] [MVP] Bronze | Points: 25

I took a scenario as you posted, then tried like this. this works fine. i am not getting any issue as you did.
My code is:

.aspx file

<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:Label Text="text" runat="server" ID="lblDisplay1" />
<asp:Button Text="Submit1" runat="server" ID="btnSubmit1" OnClick="btnSubmit1_Click" />
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<asp:Label Text="text" runat="server" ID="lblDisplay2" />
<asp:Button Text="Submit2" runat="server" ID="btnSubmit2" OnClick="btnSubmit2_Click" />

.cs file code:
protected void btnSubmit1_Click(object sender, EventArgs e)

lblDisplay1.Text = "Updatepanel1 Called";

protected void btnSubmit2_Click(object sender, EventArgs e)
lblDisplay2.Text = "Updatepanel2 Called";

Thank you,

Suraj1.Niit, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response