Posted By

leonbda on 01/21/09


Tagged

user role


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Check if User is in Role


 / Published in: C#
 

  1. string SomeUser = Page.User.Identity.Name;
  2.  
  3. if (Roles.IsUserInRole(SomeUser, "host"))
  4. {
  5. // if user is in role "host"
  6. }

Report this snippet  

You need to login to post a comment.