ScriptComponentDescriptor 類別

定義

提供一個包裝器,將伺服器元件轉換為用戶端腳本。

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
衍生

備註

此類別使用內部字典來記錄元件、元素、屬性與事件的參考。 要填充此字典,請使用 AddComponentPropertyAddElementPropertyAddPropertyAddEvent 方法。 完成後,呼叫 GetScript 該方法來產生客戶腳本。

建構函式

名稱 Description
ScriptComponentDescriptor(String)

初始化該 ScriptComponentDescriptor 類別的實例。

屬性

名稱 Description
ClientID

當在衍生類別中覆寫時,會取得用戶端元件的識別碼。

ID

取得或設定目前 ScriptComponentDescriptor 實例的 ID。

Type

取得或設定目標客戶端元件的型別。

方法

名稱 Description
AddComponentProperty(String, String)

新增指定的屬性,並將該屬性與指定的元素關聯起來。

AddElementProperty(String, String)

新增指定的屬性,並將該屬性與指定的元件關聯起來。

AddEvent(String, String)

新增指定的事件與處理器。

AddProperty(String, Object)

加入指定的屬性與價值。

AddScriptProperty(String, String)

新增指定的屬性,並將該屬性與指定的腳本關聯起來。

Equals(Object)

判斷指定的 物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetScript()

取得在頁面上實作目標控制的客戶端腳本。

GetType()

取得目前實例的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於