SiteMapNode.GetExplicitResourceString Method (String, String, Boolean)
Retrieves a localized string based on a SiteMapNode attribute to localize, a default string to return if no resource is found, and a Boolean value indicating whether to throw an exception if no resource is found.
Assembly: System.Web (in System.Web.dll)
protected string GetExplicitResourceString( string attributeName, string defaultValue, bool throwIfNotFound )
The default value to return if a matching resource is not found.
Return ValueType: System.String
A string representing the localized attribute.
The Title property, the Description property, and any custom attributes that are defined in the Attributes property. The SiteMapProvider object by which the SiteMapNode is tracked must have its EnableLocalization property set to true for the method to return a localized string. If the EnableLocalization is set to false, localization is not performed and the method is never called.method is invoked in the get accessor of the
The Title property, the Description property, and any custom attributes that are defined in the Attributes property first invoke the GetImplicitResourceString method. If it returns null, the method is invoked with defaultValue set to the value of the default value from the explicit resource expression (assuming one was defined) and throwIfNotFound set to true.
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.
Available since 2.0