母版页中内容页动作不刷新母版(同一个页面)

来源:互联网 发布:中医古籍数据库 编辑:程序博客网 时间:2024/06/07 22:08

母版页中把要异步提交的子版内容用updatepanel 包装

  <asp:UpdatePanel runat ="server" ID ="UpdatePanel1" ChildrenAsTriggers ="falseUpdateMode="Conditional" RenderMode ="Block" >
    <ContentTemplate >
      <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        </asp:contentplaceholder>
    </ContentTemplate>
    <Triggers >
    <asp:AsyncPostBackTrigger ControlID ="ContentPlaceHolder1" />

    </Triggers>
    </asp:UpdatePanel>

当然别忘记写<asp:ScriptManager runat ="server" ID="ScriptManager" ></asp:ScriptManager>

原创粉丝点击