Ejemplo n.º 1
0
        public static string DynamicAction(
            this UrlHelper url,
            string action,
            Type controller,
            object routeValues = null,
            bool absoluteUrl   = false)
        {
            var route          = CustomHelpers.AddAreaRouteValue(controller, routeValues);
            var controllerName = controller.GetControllerName();

            return(absoluteUrl
                ? url.AbsoluteAction(action, controllerName, route)
                : url.Action(action, controllerName, route));
        }