SiteMapNode.Item[String] 属性

定义

根据指定的键从 Attributes 集合或资源字符串中获取或设置自定义属性。

public:
 virtual property System::String ^ default[System::String ^] { System::String ^ get(System::String ^ key); void set(System::String ^ key, System::String ^ value); };
public virtual string this[string key] { get; set; }
member this.Item(string) : string with get, set
Default Public Overridable Property Item(key As String) As String

参数

key
String

标识要检索的属性或资源字符串的字符串。

属性值

由 标识的 key自定义属性或资源字符串;否则为 null

例外

节点是只读的。

注解

Item[] 属性是一个索引器,首先确定跟踪 SiteMapNode 对象的提供程序是否支持本地化。 如果是,则 Item[] 调用

GetImplicitResourceString 方法,传递 key 参数。 如果未返回本地化文本,则 Item[] 调用

GetExplicitResourceString 方法。

如果未返回本地化文本,或者提供程序不支持本地化,则Item[]尝试使用指定的Attributes方法从key集合中返回元素。

适用于

另请参阅