finance_teacher
asked on
ASP.Net MVC 4 C# -- Roles.GetRolesForUser() "LIKE" statement ?
I have 20+ roles that start with "BUICK"
How can I get the below "LIKE" statement working ?
I am MVC4 simpleMembership with the below SYSTEM generated database tables.
webpages_UsersInRoles
UserProfile
webpages_Membership
webpages_Roles
if (User.IsInRole("BUICK_Lead Man")) --below works
-- trying to do this instead, but it fails --> if (Roles.GetRolesForUser().L IKE("BUICK "))
{
<li>@Html.ActionLink("Abou t1", "About", "Home")</li>
}
How can I get the below "LIKE" statement working ?
I am MVC4 simpleMembership with the below SYSTEM generated database tables.
webpages_UsersInRoles
UserProfile
webpages_Membership
webpages_Roles
if (User.IsInRole("BUICK_Lead
-- trying to do this instead, but it fails --> if (Roles.GetRolesForUser().L
{
<li>@Html.ActionLink("Abou
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.