Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic sitemap contents

Thread Tools

Dynamic sitemap contents

Posts: n/a

I am using ASP.NET 2.0 siteMap provider.

I need to make the title of one of my siteMapNode elements dynamic. That
means the title should be "Profile" for logged in users and "Register" for
anonymous users. How can I do that?

Thank you,


Reply With Quote
Steven Cheng[MSFT]
Posts: n/a
Hi Max,

From your description, you're using ASP.NET 2.0 sitemap provider and
display the sitemap info on the page, currently you're wondering how to
customize the data values for a certain sitemapNode at runtime depend on
the user's login status, correct?

As for this question, I think what we shall do depend on how you use the

If you're use the SiteMappath and want to customize the display of the
current Node, you can use the SiteMap's SiteMapResolve event:

#How to: Programmatically Modify Site-Map Nodes in Memory

If you're using other Navigation control(such as TreeView and Menu) and
want to customize one or more nodes in them, you may consider use the
TreeView.TreeNodeDataBound or Menu.MenuItemDataBound event to customize the
certain Node:

protected void Menu1_MenuItemDataBound(object sender, MenuEventArgs e)
Response.Write("<br/>Menu1_MenuItemDataBound+" +e.Item.Text);
e.Item.Text = e.Item.Text + "_xxxxxxx";

protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs
Response.Write("<br/>TreeView1_TreeNodeDataBound+" + e.Node.Text);
e.Node.Text = e.Node.Text + "_xxxxxxxx";

How do you think? If you have any other ideas or questions, please feel
free to post here.


Steven Cheng

Microsoft MSDN Online Support Lead


Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at


This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change contents of web.sitemap while web app is running? yohan ASP .Net 0 05-18-2007 07:01 AM
dynamic use of sitemap to find current pages node Smokey Grindel ASP .Net 3 10-29-2006 03:11 PM
Can Sitemap.CurrentNode use non default sitemap provider? AmitKu ASP .Net 1 09-27-2006 12:25 PM
I have created a "Auction.sitemap" instead of the default "web.sitemap" - But I can't run it. Learner ASP .Net Security 5 05-07-2006 03:37 PM
Binding Treeview to Sitemap - Adding dynamic items Ray Booysen ASP .Net 3 05-03-2006 01:18 PM