Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user.IsInRole("")

Status
Not open for further replies.

stevet26

Programmer
Feb 9, 2005
53
Hi

I was wondering whether it is possible to add more than one role in the to user.IsInRole("")?

I have tried user.IsInRole("admin,editor") and that does not work.

Thanking you in advance.

 
use web.config file to add roles...

Known is handfull, Unknown is worldfull
 
I have set this up in the web.config file. That is not what what I was asking.

What i need to know is... How do I put more tha one role in user.IsInRole("")

The reason I am needing to do this; is for a navigation menu that only display some buttons dependant on your user roles.

For example, Only GlobalAdmin and HR can see the Users button in my navigation.

So what I want to do in my code is:

If User.IsInRole("GlobalAdmin,HR") then

hypUser.visible = True

end if

But I don;t know how to put two roles in the user.IsInRole("") part.
 
If User.IsInRole("GlobalAdmin") or User.IsInRole("HR") then

hypUser.visible = True

end if


Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top