ScriptComponentDescriptor 类

定义

提供用于将服务器组件转换为客户端脚本的包装程序。Provides a wrapper for converting server components into client script.

public ref class ScriptComponentDescriptor : System::Web::UI::ScriptDescriptor
public class ScriptComponentDescriptor : System.Web.UI.ScriptDescriptor
type ScriptComponentDescriptor = class
    inherit ScriptDescriptor
Public Class ScriptComponentDescriptor
Inherits ScriptDescriptor
继承
ScriptComponentDescriptor
派生

注解

此类使用内部字典保存对组件、元素、属性和事件的引用。This class uses an internal dictionary to hold references to components, elements, properties, and events. 若要填充此字典, 请AddComponentProperty使用AddElementProperty AddProperty、、和AddEvent方法。To populate this dictionary, use the AddComponentProperty, AddElementProperty, AddProperty, and AddEvent methods. 完成后, 调用GetScript方法以生成客户端脚本。When you are finished, call the GetScript method to generate the client script.

构造函数

ScriptComponentDescriptor(String)

初始化 ScriptComponentDescriptor 类的实例。Initializes an instance of the ScriptComponentDescriptor class.

属性

ClientID

当在派生类中重写时,获取客户端组件的标识符。When overridden in a derived class, gets the identifier of the client component.

ID

获取或设置当前 ScriptComponentDescriptor 实例的 ID。Gets or sets the ID of the current ScriptComponentDescriptor instance.

Type

获取或设置目标客户端组件的类型。Gets or sets the type of the target client component.

方法

AddComponentProperty(String, String)

添加指定的属性,并将该属性与指定的元素相关联。Adds the specified property, and associates that property with the specified element.

AddElementProperty(String, String)

添加指定的属性,并将该属性与指定的组件相关联。Adds the specified property and associates that property with the specified component.

AddEvent(String, String)

添加指定的事件和处理程序。Adds the specified event and handler.

AddProperty(String, Object)

添加指定的属性和值。Adds the specified property and value.

AddScriptProperty(String, String)

添加指定的属性,并将该属性与指定的脚本相关联。Adds the specified property, and associates the property with the specified script.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetScript()

获取在页上实现目标控件的客户端脚本。Gets the client script that implements the target control on the page.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于