1
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>

//some code goes here

</ContentTemplate>
 </asp:UpdatePanel>
</asp:Content>

在应用更新面板之前,它显示正常。但添加后它显示“缺少结束标记”。但是当运行代码时,它在浏览器中完美显示。

4

1 回答 1

0

您将脚本管理器移动到您的MasterPage

母版页

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

         <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        </asp:contentplaceholder>
    </div>
    </form>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>

      //some code goes here

   </ContentTemplate>
 </asp:UpdatePanel>
</asp:Content>
于 2012-10-03T08:24:09.917 回答