嵌套的UpdatePanel

    <form id="form1" runat="server">
        
<asp:ScriptManager ID="ScriptManager1" runat="server">
        
</asp:ScriptManager>

    
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        
<ContentTemplate>
            
<%= DateTime.Now %>
            
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                
<ContentTemplate>
                    
<%= DateTime.Now %>
                    
<asp:Button ID="Button1" runat="server" Text="Button" />
                
</ContentTemplate>
            
</asp:UpdatePanel>
        
</ContentTemplate>
    
</asp:UpdatePanel>

    
</form>
点击Button1按钮,只有UpdatePanel2里面的时间会更新,而UpdatePanel1中的时间不会更新,当前套UpdatePanel时,里面的UpdatePanel的控件回发不会引起外面一层的UpdatePanel更新
posted on 2008-04-23 17:11  一粒沙  阅读(1143)  评论(0编辑  收藏  举报