Export (0) Print
Expand All

SiteMapNode.GetImplicitResourceString Method

Gets a localized string based on the attribute name and ResourceKey property that is specified by the SiteMapProvider by which the SiteMapNode is tracked.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

protected string GetImplicitResourceString(
	string attributeName
)

Parameters

attributeName
Type: System.String
The SiteMapNode attribute to localize.

Return Value

Type: System.String
A string representing the localized attribute. The default is null.

ExceptionCondition
ArgumentNullException

attributeName is null.

The GetImplicitResourceString method is invoked in the get accessor of the Title property, the Description property, and any custom attributes that are defined in the Attributes property. The SiteMapProvider provider by which the SiteMapNode object is tracked must have its EnableLocalization property set to true for the GetImplicitResourceString method to be called. If the EnableLocalization is set to false, localization is not performed and the GetImplicitResourceString method is never called.

If the GetImplicitResourceString method returns a string that is not empty, this becomes the value of the Title, Description, or custom attribute property.

The GetImplicitResourceString method uses the value of the ResourceKey property to localize the attribute. If the ResourceKey is not specified, the GetImplicitResourceString returns null.

NoteNote

The XmlSiteMapProvider class imposes the restriction that the SiteMapNode object cannot define both implicit resource expressions and explicit resource expressions for attributes. However, a custom provider implementation can choose to allow both.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft