By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,466 Members | 1,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,466 IT Pros & Developers. It's quick & easy.

Question: Sitemap based on role

P: n/a
Using ASP.NET 2.0 with Memberships.

I have 2 folders, admin and client. Each folder has a sitemap file,
admin.sitemap and client.sitemap, in the appropriate directory.

I have a master page with a menu control.

How can I load the correct sitemap file into the menu control based on the
user's current role?

Thanks!
Oct 11 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Oct 10, 9:50 pm, "VB Programmer" <donotemai...@somewhere.com>
wrote:
Using ASP.NET 2.0 with Memberships.

I have 2 folders, admin and client. Each folder has a sitemap file,
admin.sitemap and client.sitemap, in the appropriate directory.

I have a master page with a menu control.

How can I load the correct sitemap file into the menu control based on the
user's current role?

Thanks!
If both parts of the site use the same master page, then I think you
could probably check which role the user is in on Page_Load, and then
set the SiteMapProvider property of the SiteMap Data source on the
page to the name of the appropriate SiteMap provider. The menu would
just be using the SiteMap data source like it would be if there was
only one sitemap, but you could leave the SiteMapProvider property of
the datasource blank since you're setting it in Page_Load. Both of
the sitemaps would need to be put in your web.config.

Oliver

Oct 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.