错误结束标记缺少更新面板

时间:2012-10-03 06:58:09

标签: asp.net .net ajax

<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>

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

1 个答案:

答案 0 :(得分:0)

您可以在MasterPage

中移动脚本管理器

MaterPage

    <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>