关于更新面板和asp:panel [英] about update panel and asp:panel

查看:88
本文介绍了关于更新面板和asp:panel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有嵌套的更新面板,并且在外部UpdatePanel中有一个asp:panel控件.当我从内部UpdatePanel生成事件时,asp:panel显示两次.

这是我的UpdatePanels结构:

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?

推荐答案

尝试给他们命名(如果他们还没有这样做的话),并将UpdateMode设置为有条件的.像这样:
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!


显示两次的原因是您的代码中实际上有2个更新面板.在下面查看您的代码:

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


这篇关于关于更新面板和asp:panel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆