I have 3 roles on my page, so I want to access the link with two roles.
I'm trying something like this
@if(User.IsInRole("Admin,User"))
{
}
Or that
@if (User.IsInRole("Admin") && User.IsInRole("User"))
{
}
Nobody works, the only one I managed to work with is:
@if (User.IsInRole("Admin")
But this is the last for only one role, how can I do what I want?
source
share