The ScriptManager must appear before any controls that need it

前端 未结 10 1777
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 11:52

I have created a new ASP.NET Web Application, and after debugging i got Server Error

The control with ID \'WaitingPopup1\' requires a ScriptManager on

相关标签:
10条回答
  • 2020-11-28 12:26
    • with a head tag with runat="server"
    • inside a form tag with runat="server"
    • before the ContentPanels that contain controls that require it - typical controls with UpdatePanels:

    <%=PageTitle%>

    </form>
     </body>
    
    0 讨论(0)
  • 2020-11-28 12:28

    It simply wants the ASP control on your ASPX page. I usually place mine right under the tag, or inside first Content area in the master's body (if your using a master page)

    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="scriptManager" runat="server"></asp:ScriptManager>
            <div>
                [Content]
            </div>
        </form>
    </body>
    
    0 讨论(0)
  • 2020-11-28 12:32

    If you are using microsoft ajax on your page you need the script manager control added to your master page or the page that needs it. It Manages ASP.NET Ajax script libraries and script files, partial-page rendering, and client proxy class generation for Web and application services

    <asp:ScriptManager ID="ScriptManger1" runat="Server">
    </asp:ScriptManager>
    

    The full usage

    <asp:ScriptManager
        AllowCustomErrorsRedirect="True|False"
        AsyncPostBackErrorMessage="string"
        AsyncPostBackTimeout="integer"
        AuthenticationService-Path="uri"
        EnablePageMethods="True|False"
        EnablePartialRendering="True|False"
        EnableScriptGlobalization="True|False"
        EnableScriptLocalization="True|False"
        EnableTheming="True|False"
        EnableViewState="True|False"
        ID="string"
        LoadScriptsBeforeUI="True|False"
        OnAsyncPostBackError="AsyncPostBackError event handler"
        OnDataBinding="DataBinding event handler"
        OnDisposed="Disposed event handler"
        OnInit="Init event handler"
        OnLoad="Load event handler"
        OnPreRender="PreRender event handler"
        OnResolveScriptReference="ResolveScriptReference event handler"
        OnUnload="Unload event handler"
        ProfileService-LoadProperties="string"
        ProfileService-Path="uri"
        RoleService-LoadRoles="True|False"
        RoleService-Path="uri"
        runat="server"
        ScriptMode="Auto|Inherit|Debug|Release"
        ScriptPath="string"
        SkinID="string"
        SupportsPartialRendering="True|False"
        Visible="True|False">
            <AuthenticationService
                Path="uri" />
            <ProfileService
                LoadProperties="string"
                Path="uri" />
            <RoleService
                LoadRoles="True|False"
                Path="uri" />
            <Scripts>
                <asp:ScriptReference
                    Assembly="string"
                    IgnoreScriptPath="True|False"
                    Name="string"
                    NotifyScriptLoaded="True|False"
                    Path="string"
                    ResourceUICultures="string"
                    ScriptMode="Auto|Debug|Inherit|Release" />
            </Scripts>
            <Services>
                <asp:ServiceReference
                    InlineScript="True|False"
                    Path="string" />
            </Services>
    </asp:ScriptManager>
    
    0 讨论(0)
  • 2020-11-28 12:32

    On the ASP.NET page, inside the form tags.

    0 讨论(0)
  • 2020-11-28 12:35

    The ScriptManager is a web control that you register in the page using

    <asp:ScriptManager ID="ScriptManger1" runat="Server" />
    

    inside the Form tag

    0 讨论(0)
  • 2020-11-28 12:37

    The ScriptManager is a control that needs to be added to the page you have created.

    Take a look at this Sample AJAX Application.

    <body>
        <form runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            ...
        </form>
    </body>
    
    0 讨论(0)
提交回复
热议问题