I have a partial view (control) that\'s used across several view pages, and I need to pass the name of the current view back to the controller - so if there\'s e.g. validati
If you just want the action name then this would do the trick:
public static string ViewName(this HtmlHelper html) { return html.ViewContext.RouteData.GetRequiredString("action"); }