Link to home
Start Free TrialLog in
Avatar of pointeman
pointemanFlag for United States of America

asked on

Roles.IsUserInRole Multiple Roles?

I'm currently using this for multiple Roles page login:

if (User.IsInRole("Administrators") | User.IsInRole("managers"))

I would like to use a shorter code like so, but not sure if its possible.

if (Roles.IsUserInRole("Administrators, managers"))
--or--
if (Roles.IsUserInRole("Administrators", "managers"))

I like using as little code as possible, when possible...

Thanks before hand..


ASKER CERTIFIED SOLUTION
Avatar of tetorvik
tetorvik
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial