ScriptManagerProxy 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当已在父元素中定义 ScriptManager 控件时,使嵌套组件(如内容页和用户控件)可以将脚本和服务引用添加到页中。
public ref class ScriptManagerProxy : System::Web::UI::Control[System.Drawing.ToolboxBitmap(typeof(EmbeddedResourceFinder), "System.Web.Resources.ScriptManagerProxy.bmp")]
public class ScriptManagerProxy : System.Web.UI.Control[<System.Drawing.ToolboxBitmap(typeof(EmbeddedResourceFinder), "System.Web.Resources.ScriptManagerProxy.bmp")>]
type ScriptManagerProxy = class
    inherit ControlPublic Class ScriptManagerProxy
Inherits Control- 继承
- 属性
注解
本主题内容:
介绍
一个网页只能包含一个 ScriptManager 控件,可以直接在页面上,也可以间接包含在嵌套组件或父组件内。 如果母版页或主机页已包含ScriptManager控件,控件ScriptManagerProxy允许向内容页和用户控件添加脚本和服务。
使用 ScriptManagerProxy 控件时,可以添加到控件 ScriptManager 定义的脚本和服务集合。 如果不希望在包含特定控件的每个页面上包含特定 ScriptManager 脚本和服务,可以从控件 ScriptManager 中删除它们。 然后,可以改用 ScriptManagerProxy 控件将它们添加到各个页面。
声明性语法
<asp:ScriptManagerProxy  
    AuthenticationService-Path="uri"  
    EnableTheming="True|False"  
    EnableViewState="True|False"  
    ID="string"  
    OnDataBinding="DataBinding event handler"  
    OnDisposed="Disposed event handler"  
    OnInit="Init event handler"  
    OnLoad="Load event handler"  
    OnPreRender="PreRender event handler"  
    OnUnload="Unload event handler"  
    ProfileService-LoadProperties="string"  
    ProfileService-Path="uri"  
    RoleService-LoadRoles="True|False"  
    RoleService-Path="uri"  
    runat="server"  
    SkinID="string"  
    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:ScriptManagerProxy>  
构造函数
| ScriptManagerProxy() | 初始化 ScriptManagerProxy 类的新实例。 | 
属性
| Adapter | 获取控件的浏览器特定适配器。(继承自 Control) | 
| AppRelativeTemplateSourceDirectory | 获取或设置包含该控件的 Page 或 UserControl 对象的应用程序相对虚拟目录。(继承自 Control) | 
| AuthenticationService | 获取与当前 ScriptManagerProxy 实例关联的 AuthenticationServiceManager 对象。 | 
| BindingContainer | 获取包含该控件的数据绑定的控件。(继承自 Control) | 
| ChildControlsCreated | 获取一个值,该值指示是否已创建服务器控件的子控件。(继承自 Control) | 
| ClientID | 获取由 ASP.NET 生成的 HTML 标记的控件 ID。(继承自 Control) | 
| ClientIDMode | 获取或设置用于生成 ClientID 属性值的算法。(继承自 Control) | 
| ClientIDSeparator | 获取一个字符值,该值表示 ClientID 属性中使用的分隔符字符。(继承自 Control) | 
| CompositeScript | 获取对支持内容页的复合脚本的引用。 | 
| Context | 为当前 Web 请求获取与服务器控件关联的 HttpContext 对象。(继承自 Control) | 
| Controls | 获取 ControlCollection 对象,该对象表示 UI 层次结构中的指定服务器控件的子控件。(继承自 Control) | 
| DataItemContainer | 如果命名容器实现 IDataItemContainer,则获取对命名容器的引用。(继承自 Control) | 
| DataKeysContainer | 如果命名容器实现 IDataKeysControl,则获取对命名容器的引用。(继承自 Control) | 
| DesignMode | 获取一个值,该值指示是否正在使用设计图面上的一个控件。(继承自 Control) | 
| EnableTheming | 获取或设置一个值,该值指示主题是否应用于该控件。(继承自 Control) | 
| EnableViewState | 获取或设置一个值,该值指示服务器控件是否向发出请求的客户端保持自己的视图状态以及它所包含的任何子控件的视图状态。(继承自 Control) | 
| Events | 获取控件的事件处理程序委托列表。 此属性为只读。(继承自 Control) | 
| HasChildViewState | 获取一个值,该值指示当前服务器控件的子控件是否具有任何已保存的视图状态设置。(继承自 Control) | 
| ID | 获取或设置分配给服务器控件的编程标识符。(继承自 Control) | 
| IdSeparator | 获取用于分隔控件标识符的字符。(继承自 Control) | 
| IsChildControlStateCleared | 获取一个值,该值指示该控件中包含的控件是否具有控件状态。(继承自 Control) | 
| IsTrackingViewState | 获取一个值,用于指示服务器控件是否会将更改保存到其视图状态中。(继承自 Control) | 
| IsViewStateEnabled | 获取一个值,该值指示是否为该控件启用了视图状态。(继承自 Control) | 
| LoadViewStateByID | 获取一个值,该值指示控件是否通过 ID 而不是索引参与加载其视图状态。(继承自 Control) | 
| NamingContainer | 获取对服务器控件的命名容器的引用,此引用创建唯一的命名空间,以区分具有相同 ID 属性值的服务器控件。(继承自 Control) | 
| Page | 获取对包含服务器控件的 Page 实例的引用。(继承自 Control) | 
| Parent | 获取对页 UI 层次结构中服务器控件的父控件的引用。(继承自 Control) | 
| ProfileService | 获取与当前 ScriptManagerProxy 实例关联的 ProfileServiceManager 对象。 | 
| RenderingCompatibility | 获取一个值,该值指定呈现的 HTML 将与之兼容的 ASP.NET 版本。(继承自 Control) | 
| RoleService | 获取与当前 ScriptManagerProxy 实例关联的 RoleServiceManager 对象。 | 
| Scripts | 获取一个 ScriptReferenceCollection 对象,该对象包含显式注册到 ScriptReference 控件的每个脚本文件的 ScriptManagerProxy 对象。 | 
| Services | 获取一个 ScriptReferenceCollection 对象,该对象包含显式注册到 ServiceReference 控件的每个服务的 ScriptManagerProxy 对象。 | 
| Site | 获取容器信息,该容器在呈现于设计图面上时承载当前控件。(继承自 Control) | 
| SkinID | 获取或设置要应用于控件的外观。(继承自 Control) | 
| TemplateControl | 获取或设置对包含该控件的模板的引用。(继承自 Control) | 
| TemplateSourceDirectory | 获取包含当前服务器控件的 Page 或 UserControl 的虚拟目录。(继承自 Control) | 
| UniqueID | 获取服务器控件的唯一的、以分层形式限定的标识符。(继承自 Control) | 
| ValidateRequestMode | 获取或设置指示控件是否检查来自浏览器的客户端输入是否具有潜在危险值的值。(继承自 Control) | 
| ViewState | 获取状态信息的字典,这些信息使您可以在同一页的多个请求间保存和还原服务器控件的视图状态。(继承自 Control) | 
| ViewStateIgnoresCase | 获取一个值,该值指示 StateBag 对象是否不区分大小写。(继承自 Control) | 
| ViewStateMode | 获取或设置此控件的视图状态模式。(继承自 Control) | 
| Visible | 
方法
事件
| DataBinding | 当服务器控件绑定到数据源时发生。(继承自 Control) | 
| Disposed | 当从内存释放服务器控件时发生,这是请求 ASP.NET 页时服务器控件生存期的最后阶段。(继承自 Control) | 
| Init | 当服务器控件初始化时发生;初始化是控件生存期的第一步。(继承自 Control) | 
| Load | 当服务器控件加载到 Page 对象中时发生。(继承自 Control) | 
| Navigate | 当用户点击浏览器的“后退”或“前进”按钮时发生。 | 
| PreRender | 在加载 Control 对象之后、呈现之前发生。(继承自 Control) | 
| Unload | 当服务器控件从内存中卸载时发生。(继承自 Control) | 
显式接口实现
| IControlBuilderAccessor.ControlBuilder | 有关此成员的说明,请参见 ControlBuilder。(继承自 Control) | 
| IControlDesignerAccessor.GetDesignModeState() | 有关此成员的说明,请参见 GetDesignModeState()。(继承自 Control) | 
| IControlDesignerAccessor.SetDesignModeState(IDictionary) | 有关此成员的说明,请参见 SetDesignModeState(IDictionary)。(继承自 Control) | 
| IControlDesignerAccessor.SetOwnerControl(Control) | 有关此成员的说明,请参见 SetOwnerControl(Control)。(继承自 Control) | 
| IControlDesignerAccessor.UserData | 有关此成员的说明,请参见 UserData。(继承自 Control) | 
| IDataBindingsAccessor.DataBindings | 有关此成员的说明,请参见 DataBindings。(继承自 Control) | 
| IDataBindingsAccessor.HasDataBindings | 有关此成员的说明,请参见 HasDataBindings。(继承自 Control) | 
| IExpressionsAccessor.Expressions | 有关此成员的说明,请参见 Expressions。(继承自 Control) | 
| IExpressionsAccessor.HasExpressions | 有关此成员的说明,请参见 HasExpressions。(继承自 Control) | 
| IParserAccessor.AddParsedSubObject(Object) | 有关此成员的说明,请参见 AddParsedSubObject(Object)。(继承自 Control) | 
扩展方法
| FindDataSourceControl(Control) | 返回与指定控件的数据控件关联的数据源。 | 
| FindFieldTemplate(Control, String) | 返回指定控件的命名容器中指定列的字段模板。 | 
| FindMetaTable(Control) | 返回包含数据控件的元表对象。 |