custom data in SiteMapNode (ASP.NET 2.0)

Discussion in 'ASP .Net' started by Nate Hekman, Dec 1, 2004.

  1. Nate Hekman

    Nate Hekman Guest

    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
    Nate Hekman, Dec 1, 2004
    #1
    1. Advertising

  2. Nate Hekman

    Nate Hekman Guest

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

    Nate

    "Nate Hekman" <> wrote in message
    news:%...
    > 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
    >
    >
    Nate Hekman, Dec 1, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Danny Tuppeny

    Possible to hide siteMapNode from menu?

    Danny Tuppeny, Oct 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    2,667
    Danny Tuppeny
    Oct 27, 2005
  2. Big Chodder

    SiteMapNode Parameter Question

    Big Chodder, Jan 17, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    701
    Big Chodder
    Jan 17, 2006
  3. Leo

    siteMapNode Question

    Leo, May 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,519
    Juan T. Llibre
    May 12, 2006
  4. =?Utf-8?B?RGF2aWQ=?=

    Why cant I put a url to another site in the siteMapNode

    =?Utf-8?B?RGF2aWQ=?=, May 22, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    366
    =?Utf-8?B?RGF2aWQ=?=
    May 22, 2006
  5. Jon Edney

    ASP.NET 2.0 Beta 1 <siteMapNode> roles=""

    Jon Edney, Apr 12, 2005, in forum: ASP .Net Security
    Replies:
    3
    Views:
    226
    Brock Allen
    Apr 12, 2005
Loading...

Share This Page