Monday, March 26, 2012

updating form updatepanel to updatepanel or one to many updatepanel

Hi all,

i have two updatepanels.

<updA>

<uc1 ..ascx> [...Reload this control or updating this panel ]

</updA>

<updB>

<uc2 ..ascx> [...onclick event ]

</updB>

i hope you anyone can solve this..

thanks

pkay

I am not sure what is your question. Can you please clarify? Thanks


When an updatePanel is updated, all the other updatePanels on the page also are updated.

This means that both <updA> and <updB> will be updated if you update one of them.

To avoid this, you can play with the "updateMode" updatePanel's property. This property is set to "always" by default but you can change it to "conditionnal" and then choose by yourself when your update panel has to be updated.


Hope it helps


hi kalahaine,

i got it. thanks for solution.

pkay


No problemSmile

Do not forget to mark your topic as answered.


hi all,

This is an updatepanel updating to other updatepanel: here my correct solution :

--updatepanel one

<asp:UpdatePanelrunat="server"ID="AAAupdatepanel"UpdateMode="Conditional">

<ContentTemplate>

<asp:UpdateProgressID="UpdateProgress2"runat="server"AssociatedUpdatePanelID="AAAupdatepanel">

<ProgressTemplate>

<imgsrc="images/loading-gif-sample-2.gif"alt=""/>

Loading .....

</ProgressTemplate>

</asp:UpdateProgress>

<uc3:AAAControlID="AAAControl1"runat="server"/>

</ContentTemplate>

</asp:UpdatePanel>

--updatepanel two

<asp:UpdatePanelrunat="server"ID="BBBupdatepanel"UpdateMode="Conditional">

<ContentTemplate>

<asp:UpdateProgressID="UpdateProgress2"runat="server"AssociatedUpdatePanelID="BBBupdatepanel">

<ProgressTemplate>

<imgsrc="images/loading-gif-sample-2.gif"alt=""/>

Loading .....

</ProgressTemplate>

</asp:UpdateProgress>

<uc3:BBBControlID="BBBControl1"runat="server"/>

</ContentTemplate>

</asp:UpdatePanel>

--updatepanel three

<asp:UpdatePanelrunat="server"ID="CCCupdatepanel"UpdateMode="Conditional">

<ContentTemplate>

<asp:UpdateProgressID="UpdateProgress2"runat="server"AssociatedUpdatePanelID="CCCupdatepanel">

<ProgressTemplate>

<imgsrc="images/loading-gif-sample-2.gif"alt=""/>

Loading .....

</ProgressTemplate>

</asp:UpdateProgress>

<asp:ButtonID="Button1"runat="server"Text="Button"/>

</ContentTemplate>

</asp:UpdatePanel>

-------here is code behind--------

ProtectedSub Button1_Click1(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click

Me.AAAupdatepanel.Update()

Me.BBBupdatepanel.Update()

EndSub

No comments:

Post a Comment