ScriptComponentDescriptor.AddComponentProperty(String, String) 方法

定义

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

public:
 void AddComponentProperty(System::String ^ name, System::String ^ componentID);
public void AddComponentProperty (string name, string componentID);
member this.AddComponentProperty : string * string -> unit
Public Sub AddComponentProperty (name As String, componentID As String)

参数

name
String

属性的名称。The name of the property.

componentID
String

目标组件的 ID。The ID of the target component.

异常

namecomponentIDnull 或空字符串 ("")。name or componentID is null or an empty string ("").

注解

此方法会将指定的属性添加到控件使用的属性的内部字典, 并由GetScript方法转换为客户端脚本。This method adds the specified property to the internal dictionary of properties that are used by the control and converted to client script by the GetScript method.

适用于