I'm working with Roles for my asp.net webform application. I have all have RoleName already saved in database. What i want to achieve though, is that when a user logs in, i want to get the roleName of the user so as to use it for another thing(to query to Db for a specific result to be displayed.) i have tried to use
<pre>var userRole = Roles.GetRolesForUser(user.Value);
<pre lang="text">if (Membership.ValidateUser(user.Value, Password.Value)) { var userRole = Roles.GetRolesForUser(user.Value); var GetSomeRecords = users.Where(m => m.Myrole == userRole).ToList(); }
string[] userRoles = Roles.GetRolesForUser(user.Value); string userRole = userRoles.Length == 0 ? null : userRoles[0];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)