custom data in SiteMapNode (ASP.NET 2.0)

  • Thread starter Thread starter Nate Hekman
  • Start date Start date
N

Nate Hekman

The documentation for the SiteMapNode class refers to a public property
named Item, which is supposed to get a custom attribute from the Attributes
collection. But when I include this line in my aspx:

<%= SiteMap.CurrentNode.Item %>

I get this compiler error:

CS0117: 'System.Web.SiteMapNode' does not contain a definition for
'Item'

Is the documentation wrong? Is there some other way to get at the
Attributes collection?


Nate
 
Oh, I figured it out! Instead of SiteMap.CurrentNode.Item["foo"], I should
be using SiteMap.CurrentNode["foo"].

Nate
 
Back
Top