我创建了一个新的ASP.NET Web应用程序,调试后我收到了服务器错误
ID为'WaitingPopup1'的控件需要页面上的ScriptManager.ScriptManager必须出现在需要它的任何控件之前.
我是ASP.NET的新手,所以我可以在web.config中安装我的ScriptManager吗?
AMe*_*ber 61
这ScriptManager
是一个需要添加到您创建的页面的控件.
看看这个示例AJAX应用程序.
<body>
<form runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
...
</form>
</body>
Run Code Online (Sandbox Code Playgroud)
如果您在页面上使用microsoft ajax,则需要将脚本管理器控件添加到主页或需要它的页面.它管理ASP.NET Ajax脚本库和脚本文件,部分页面呈现以及Web和应用程序服务的客户端代理类生成
<asp:ScriptManager ID="ScriptManger1" runat="Server">
</asp:ScriptManager>
Run Code Online (Sandbox Code Playgroud)
<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>
Run Code Online (Sandbox Code Playgroud)
小智 5
您可以<Form>
在页面标记的正下方添加脚本管理器标记.以下是放置脚本管理器标记的方法.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
Run Code Online (Sandbox Code Playgroud)
如果您使用母版页,建议您在母版页中使用脚本管理器,这样您就不必在包含AJAX控件的每个页面上反复编写它.
归档时间: |
|
查看次数: |
149824 次 |
最近记录: |