Disabling certain url's in a menu?

K

kfrost

Hello,

I have a menu bound to a SiteMapDataSource which reads from my web.sitemap.

I'm using the menu in a master page and everything works fine but I need to
some of the menu items to be disabled depending on the user who is accessing
the web page.

For example I have a menu as with the follow nodes.
Freight
Add
Search

Certain users will only search and I want to disable the Add item. Anybody
have any ideas as to how to go about doing this?

Thanks.

kris
--
(e-mail address removed).<Remove This Before Emailing>

Network & Software Integration
www.n-sv.com

"Helping put the pieces of your IT puzzle together"
 
K

kfrost

Hmm, walked through that and I guess it's ok if you want to spend the time to
hassle through it. Also, I'm not going to define ASP.Net Roles. This is an
intranet application and we're using security groups to control access.

To verify authorization we use User.IsInRole("Domain\username");

I stilled try following the direction in the link you sent but with
roles="*" on the urls, adding the settings to the web.config blocks the
entire menu. So I assume you have to enable roles which I'm not interested
in doing at this point to try and do something this simple.

So isn't there a simple way to find the menuitem or node in the datasource
and disable just disable it when the page loads?

thanks.

--
(e-mail address removed).<Remove This Before Emailing>

Network & Software Integration
www.n-sv.com

"Helping put the pieces of your IT puzzle together"
 
K

kfrost

P.S. To enable roles in ASP.Net 2.0, don't you need to have sqlexpress
installed on the server? I'm not sure if the .Net 2.0 framework installs sql
express by default but sqlexpress will not be running on this server.

Again, haven't spent that much time with roles and don't really care to in
this project.

So that puts me back to the original question and is there a way to disable
a menu item or hide it programmatically when it's populated from a
web.sitemap file?

Thanks.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top