Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Asp.net2 Menu control dynamic display based on User Role!!!Help please!!!

Reply
Thread Tools

Asp.net2 Menu control dynamic display based on User Role!!!Help please!!!

 
 
Sri Reddy
Guest
Posts: n/a
 
      05-02-2006


Hi
I want to create a horizontal menu on my website being built using
asp.net2 with menu items based on the "role" of the user who logged into
the system.Role iformation will be read from database...

For ex:
for a user with "Admin" role, i would like to show "Menu Item1", "Menu
Item2", "Menu Item3", "Menu Item4". Where as if the user belongs to
"Help-desk" role, i would like to show only "Menu Item1" and "Menu
Item3"...

Also, i want to provide an alternative to access "Menu Items" if the
java-script is disabled...

Wondering what options do i got....
Thanks
Sri




*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-03-2006
You could provide altername web.sitemaps files for each role, then configure
multiple XmlSiteMapProviders in web.config, then dynamically assign the ProviderName
property to the SiteMapDataSource based upon the role.

-Brock
http://staff.develop.com/ballen


> Hi
> I want to create a horizontal menu on my website being built using
> asp.net2 with menu items based on the "role" of the user who logged
> into
> the system.Role iformation will be read from database...
> For ex:
> for a user with "Admin" role, i would like to show "Menu Item1", "Menu
> Item2", "Menu Item3", "Menu Item4". Where as if the user belongs to
> "Help-desk" role, i would like to show only "Menu Item1" and "Menu
> Item3"...
> Also, i want to provide an alternative to access "Menu Items" if the
> java-script is disabled...
>
> Wondering what options do i got....
> Thanks
> Sri
> *** Sent via Developersdex http://www.developersdex.com ***
>



 
Reply With Quote
 
 
 
 
Jules
Guest
Posts: n/a
 
      06-21-2006
hi

i hope i understand your problem. for each type of role, you would like to
show a specific menu. ok, try this

<siteMapNode url="gohere.aspx" title="You are here" description="You cannot
see me" roles ="Admin" />

as you can see, you can add the role that is allow to see the menu. only
users with the role admin will be able to see the menu"you are here"

happy programming!!!

Jules




"Brock Allen" <> wrote in message
news: om...
> You could provide altername web.sitemaps files for each role, then
> configure multiple XmlSiteMapProviders in web.config, then dynamically
> assign the ProviderName property to the SiteMapDataSource based upon the
> role.
>
> -Brock
> http://staff.develop.com/ballen
>
>
>> Hi
>> I want to create a horizontal menu on my website being built using
>> asp.net2 with menu items based on the "role" of the user who logged
>> into
>> the system.Role iformation will be read from database...
>> For ex:
>> for a user with "Admin" role, i would like to show "Menu Item1", "Menu
>> Item2", "Menu Item3", "Menu Item4". Where as if the user belongs to
>> "Help-desk" role, i would like to show only "Menu Item1" and "Menu
>> Item3"...
>> Also, i want to provide an alternative to access "Menu Items" if the
>> java-script is disabled...
>>
>> Wondering what options do i got....
>> Thanks
>> Sri
>> *** Sent via Developersdex http://www.developersdex.com ***
>>

>
>



 
Reply With Quote
 
Jules
Guest
Posts: n/a
 
      06-21-2006
hey

i forgot to add that if you want to menu to be horizontal instead of
vertical, check the properties of the menu and there is a property
"Orientation" change it to what ever you want.

happy programming!!!
Jules

"Brock Allen" <> wrote in message
news: om...
> You could provide altername web.sitemaps files for each role, then
> configure multiple XmlSiteMapProviders in web.config, then dynamically
> assign the ProviderName property to the SiteMapDataSource based upon the
> role.
>
> -Brock
> http://staff.develop.com/ballen
>
>
>> Hi
>> I want to create a horizontal menu on my website being built using
>> asp.net2 with menu items based on the "role" of the user who logged
>> into
>> the system.Role iformation will be read from database...
>> For ex:
>> for a user with "Admin" role, i would like to show "Menu Item1", "Menu
>> Item2", "Menu Item3", "Menu Item4". Where as if the user belongs to
>> "Help-desk" role, i would like to show only "Menu Item1" and "Menu
>> Item3"...
>> Also, i want to provide an alternative to access "Menu Items" if the
>> java-script is disabled...
>>
>> Wondering what options do i got....
>> Thanks
>> Sri
>> *** Sent via Developersdex http://www.developersdex.com ***
>>

>
>



 
Reply With Quote
 
 
 
Reply

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
class-based access control VS instance-based access control xz C++ 9 01-08-2008 11:20 AM
Menu Control and Sitemap, eliminate the home column on the menu display empire5 ASP .Net 1 01-11-2007 03:30 AM
2.0 Menu control : Can the dynamic popup menu items be divided into 2 columns instead of 1? Perry Loh ASP .Net Web Controls 0 03-24-2006 04:44 AM
How to create dynamic menu with user roles (Treeview menu) naijacoder naijacoder ASP .Net Web Controls 0 09-27-2004 09:33 AM
formating display of javascript dropdown menu(script is in user control) Phl ASP .Net 0 07-26-2004 04:43 PM



Advertisments