Tuesday, March 13, 2012

SiteMapPath: Can I add node the following way?

Hello,
I want to add nodes to Asp.Net 2.0 SiteMapPath in my runtime code.
I did as follows:
' Create site map path node collection
Dim siteMapPathNodeCollection As SiteMapNodeCollection
' Add node
siteMapPathNodeCollection.Add(New SiteMapNode(...))
My problem is I am ask to insert a 'provider' in SiteMapNode. I don't
get it.
I have a data view with various rows and 2 columns 'Title' and 'Url'.
All I want is add these rows values to my site map path.
I was trying to loop through each row in my dataview but I am getting
this problem with the provider.
Can someone sugest me how to do this?
Thanks,
MiguelThe norm is to use the web.sitemap to figure out where the user is in
hierarchy (logically, as the physical pages do not have to correspond to
"menu" hierarchy). If you want another means of representing this data, you
have to create a custom provider to turn your data into a proper path.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
****************************************
*********
Think outside of the box!
****************************************
*********
"shapper" <mdmoura@.gmail.com> wrote in message
news:1162492840.544381.60320@.f16g2000cwb.googlegroups.com...
> Hello,
> I want to add nodes to Asp.Net 2.0 SiteMapPath in my runtime code.
> I did as follows:
> ' Create site map path node collection
> Dim siteMapPathNodeCollection As SiteMapNodeCollection
> ' Add node
> siteMapPathNodeCollection.Add(New SiteMapNode(...))
> My problem is I am ask to insert a 'provider' in SiteMapNode. I don't
> get it.
> I have a data view with various rows and 2 columns 'Title' and 'Url'.
> All I want is add these rows values to my site map path.
> I was trying to loop through each row in my dataview but I am getting
> this problem with the provider.
> Can someone sugest me how to do this?
> Thanks,
> Miguel
>

0 comments:

Post a Comment