CSS class won't be applied to a helper extension with a partial view
问题 I am trying to display a list of categories with a partial view. The class "selected" should be applied to a specific category when it is selected. However, the class does not get applied if the list is return as a partial view. _Layout page: <nav> @Html.Action("_getCategories", "Home") </nav> Action in Home controller: public ActionResult _getCategories() { var Categories = repository.getCategories(); return PartialView(Categories); } Helper extension public static MvcHtmlString MenuLink