Click here to Skip to main content
15,897,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have nested update panels and in the outer UpdatePanel there is an asp:panel control. When I generate an event from inner UpdatePanel,asp:panel is displayed twice.

This is my structure of UpdatePanels:
<asp:UpdatePanel>
    <asp:UpdatePanel>
    </asp:UpdatePanel>
       <i have triggered event here >
   <asp:panel> </ asp:panel>
</asp:UpdatePanel>


Why is this panel displayed twice?
Posted
Updated 12-Aug-10 6:34am
v2
Comments
E.F. Nijboer 12-Aug-10 12:37pm    
Put code between pre tags. Use complete sentences and don't be lazy, so just write UpdatePanel if you mean UpdatePanel instead of your own abbreviations like updtpnl.

Try give them a name if they don't already do and set the UpdateMode to conditional. like this:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">


Good luck!
 
Share this answer
 
The reason why it is displayed twice is that there are actually 2 update panels in your code. Have a look at your code here below:

<asp:UpdatePanel> 
             <asp:UpdatePanel>

              <second update="" panel="" starts="" here="">

             </asp:UpdatePanel>
        
             <i have triggered event here >
             
             <asp:panel> 

            </ asp:panel>
 </asp:UpdatePanel></second>


you need to do a code like the one below:

<asp:UpdatePanel>
        <asp:panel xmlns:asp="#unknown"> 
             <i have triggered event here >
             
       </ asp:panel>
 </asp:UpdatePanel>





I hope this one helps.
Best Regards
 
Share this answer
 
v3

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