I'm used to create custom attributes to prevent different access level to reach some methods in a controller:
[AuthorizeUser(AccessLevel = "Administrator")]
public ActionResult Index()
{
return View("Index");
}
But now I would like to use the same custom attribute in a view. The goal would be to display some HTML when you are an administrator for example.
It sounds strange but I found nothing about that. Any help would be appreciated.