语言

SiteMapNode.GetImplicitResourceString(String) 方法

定义

根据所跟踪的属性名称和ResourceKey属性SiteMapProviderSiteMapNode获取本地化字符串。

protected:
 System::String ^ GetImplicitResourceString(System::String ^ attributeName);
protected string GetImplicitResourceString(string attributeName);
member this.GetImplicitResourceString : string -> string
Protected Function GetImplicitResourceString (attributeName As String) As String

参数

attributeName
String

要 SiteMapNode 本地化的属性。

返回

一个表示本地化属性的字符串。 默认值为 null。

例外

attributeName 是 null。

注解

该方法 GetImplicitResourceString 在属性的 get 访问器 Title 、 Description 属性和属性中定义的任何自定义属性中 Attributes 调用。 SiteMapProvider所跟踪对象的提供程序SiteMapNode必须为其EnableLocalization属性设置为trueGetImplicitResourceString要调用的方法。 如果设置为 EnableLocalizationfalse,则不会执行本地化,GetImplicitResourceString并且永远不会调用该方法。

GetImplicitResourceString如果该方法返回的字符串不为空,则此值将成为自定义Title属性或自定义属性的值Description。

该方法 GetImplicitResourceString 使用属性的值 ResourceKey 本地化属性。 如果未指定, ResourceKey 则 GetImplicitResourceString 返回 null。

注释

该 XmlSiteMapProvider 类施加了 SiteMapNode 该对象不能为属性定义隐式资源表达式和显式资源表达式的限制。 但是,自定义提供程序实现可以选择允许这两者。

适用于

另请参阅