@using Resources @{ var controller = ViewContext.RouteData.Values["controller"].ToString(); } @helper actived(string c, string controller) { var Clist = c.ToLowerInvariant().Split(',').ToList(); if (Clist.Contains(controller.ToLowerInvariant())) { @:active } }