asp.net mvc - Access User.Identity.Name in HTMLHelper class -


I am writing an HTMLHelper but I must enter User.Identity.Name, how do I do it?

  public static string YourHtmlHelper (this HtmlHelper html) {var name = html.ViewContext.HttpContext .User.Identity .Name; }  

Comments