1

我正在使用母版页。我在 UpdatePanel 中的 contentplaceholder。在我的内容页面中,我保留了数据。一些数据在另一个更新面板中。在 contentpage 中有一个按钮。当按钮单击事件触发时,它也会刷新子更新面板。我不希望这种情况发生。我怎样才能实现它?

Code

母版页

<UpdatePanel>
   <asp:contentplaceholder id="c1">  </contentplaceholder>
<UpdatePanel>

        <asp:content id="content" contentplaceholderid="c1">  
    // This button fire the event
               <asp:button> </asp:button>
    // Don't want to refresh this panel.
               <UpdatePanel id="childUpdatePanel" UpdateMode="Conditional">  
               </UpdatePanel>
        </asp:content>
4

2 回答 2

0

像这样使用更新面板

母版页

<asp:contentplaceholder id="c1">  </contentplaceholder>

   <asp:content id="content" contentplaceholderid="c1">  
   // This button fire the event
   <UpdatePanel>
           <asp:button> </asp:button>
   </UpdatePanel>
// Don't want to refresh this panel.
           <UpdatePanel id="childUpdatePanel" UpdateMode="Conditional">  
           </UpdatePanel>
    </asp:content>
于 2013-11-08T10:31:27.513 回答
0

您可以像这样在母版页中再添加一个内容面板

母版页

   <UpdatePanel>
     <asp:contentplaceholder id="c1">  </contentplaceholder>
   <UpdatePanel>
   <asp:contentplaceholder id="c4">  </contentplaceholder>

    <asp:content id="content" contentplaceholderid="c1">  

           <asp:button> </asp:button>

    </asp:content>

    <asp:content id="content" contentplaceholderid="c4">  
       <UpdatePanel id="childUpdatePanel" UpdateMode="Conditional">  
       </UpdatePanel>
    </asp:content>
于 2013-11-08T10:58:56.803 回答