private static bool IsSelected(HtmlHelper htmlHelper, string controller, string action) { var currentAction = htmlHelper.GetRequiredString("action"); var currentController = htmlHelper.GetRequiredString("controller"); return currentAction.ToLower() == action.ToLower() && currentController.ToLower() == controller.ToLower(); }