Routingata will contain this information. The key "controller" will contain the name of the controller, and the key "action" will contain the name of the action.
, , body, . - :
<body id="<%=Html.GetBodyId()%>">
GetBodyId() :
public static string GetBodyId(this HtmlHelper helper) {
return string.Format("{0}-{1}",
helper.ViewContext.RouteData.GetRequiredString("controller"),
helper.ViewContext.RouteData.GetRequiredString("action");
}
, :
<a href="[[link]]" class="home-index-link">Home</a>
css , -. :
.home-index-link {
}
#home-index .home-index-link {
}