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; }
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
Post a Comment