Reputation: 8225
I am trying to get the role of the user which just logged in the website. I am doing this:
string userRole = Roles.GetRolesForUser(LoginUser.UserName).ToString();
but that returns 'System.String', not the real role :(. What am I doing wrong? Thanks
P.S. LoginUser is the login control
Upvotes: 0
Views: 612
Reputation: 14874
string[] roles = RoleProvider.GetRolesForUser(LoginUser.UserName);
http://msdn.microsoft.com/en-us/library/ff647401.aspx
Upvotes: 1