HyperLinkField.DataNavigateUrlFields 属性
定义
获取或设置数据源中字段的名称,用于为 HyperLinkField 对象中的超链接构造 URL。Gets or sets the names of the fields from the data source used to construct the URLs for the hyperlinks in the HyperLinkField object.
public:
virtual property cli::array <System::String ^> ^ DataNavigateUrlFields { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.StringArrayConverter))]
public virtual string[] DataNavigateUrlFields { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.StringArrayConverter))>]
member this.DataNavigateUrlFields : string[] with get, set
Public Overridable Property DataNavigateUrlFields As String()
属性值
- String[]
包含数据源中字段的名称的数组,用于为 HyperLinkField 中的超链接构造 URL。An array containing the names of the fields from the data source used to construct the URLs for the hyperlinks in the HyperLinkField. 默认值为空数组,表明未设置 DataNavigateUrlFields。The default is an empty array, indicating that DataNavigateUrlFields is not set.
- 属性
注解
DataNavigateUrlFields当数据源包含多个必须进行组合以创建对象的超链接的字段时,请使用属性 HyperLinkField 。Use the DataNavigateUrlFields property when the data source contains multiple fields that must be combined to create the hyperlinks for the HyperLinkField object. 在属性中指定的字段 DataNavigateUrlFields 与属性中的格式字符串组合在一起 DataNavigateUrlFormatString ,以构造对象中的超链接 HyperLinkField 。The fields specified in the DataNavigateUrlFields property are combined with the format string in the DataNavigateUrlFormatString property to construct the hyperlinks in the HyperLinkField object.
备注
在 DataNavigateUrlFields .aspx 文件中使用声明性代码设置属性时,请使用以逗号分隔的字段名称列表。When you set the DataNavigateUrlFields property with declarative code in an .aspx file, use a comma-separated list of field names.
您可以使用 NavigateUrl 属性将超链接的 url 设置为静态值,而不是使用此属性将超链接的 url 绑定到字段。Instead of using this property to bind the URLs of the hyperlinks to a field, you can use the NavigateUrl property to set the hyperlinks' URL to a static value. 在此选项中,每个超链接共享相同的 URL。With this option, each hyperlink shares the same URL.
备注
如果 DataNavigateUrlFields NavigateUrl 同时设置了和属性,则 DataNavigateUrlFields 属性优先。If the DataNavigateUrlFields and the NavigateUrl properties are both set, the DataNavigateUrlFields property takes precedence.