custom data in SiteMapNode (ASP.NET 2.0)

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
 
N

Nate Hekman

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

Nate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top