DataControlFieldDesigner.GetNewDataSourceName 方法

定義

取得控制項的唯一 ID,這個 ID 是在資料欄位轉換成 TemplateField 時所建立的。

protected:
 System::String ^ GetNewDataSourceName(Type ^ controlType, System::Web::UI::WebControls::DataBoundControlMode mode);
protected string GetNewDataSourceName (Type controlType, System.Web.UI.WebControls.DataBoundControlMode mode);
member this.GetNewDataSourceName : Type * System.Web.UI.WebControls.DataBoundControlMode -> string
Protected Function GetNewDataSourceName (controlType As Type, mode As DataBoundControlMode) As String

參數

controlType
Type

將建立之控制項的型別。

mode
DataBoundControlMode

控制項的資料輸入模式。

傳回

控制項的唯一 ID。

備註

方法 GetNewDataSourceName 是協助程式方法,可由 方法用來 CreateTemplateField 產生控制項的唯一識別碼,當您按一下連結以將資料欄位 TemplateField 轉換成欄位編輯器中的 時所建立的控制項。

適用於