I am using
If(User.IsInRole("member"))
{
}
but not able to get it to work in C# MVC class. Note that I am not using it in a controller which I am able to get working. What am I missing? The code does not even recognize what User is.
I think it may be a namespace but I have used the .Mvc namespace as well as other..
Thank you in advance
Use
HttpContext.Current.Userinstead