Share via


DataControlFieldDesigner.GetNewDataSourceName 方法

定义

获取当数据字段转换为 TemplateField 时创建的控件的唯一 ID。

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 转换为字段编辑器中的 时创建的控件生成唯一 ID。

适用于