Ejemplo n.º 1
0
        public static void RenderActionButton(this HtmlHelper helper, ActionButton model)
        {
            string templateName = defaultTemplateName;

            if (model.ControllerName.IsNullOrEmpty())
            {
                model.ControllerName = (string)helper.ViewContext.RouteData.Values["controller"];
            }

            if (model.ActionName.IsNullOrEmpty())
            {
                model.ActionName = (string)helper.ViewContext.RouteData.Values["action"];
            }

            helper.RenderPartial(templateName, model, helper.ViewDataContainer.ViewData);
        }
Ejemplo n.º 2
0
        public static void RenderActionButton(this HtmlHelper helper, ActionButton model)
        {
            string templateName = defaultTemplateName;

            if (model.ControllerName.IsNullOrEmpty())
            {
                model.ControllerName = (string)helper.ViewContext.RouteData.Values["controller"];
            }

            if (model.ActionName.IsNullOrEmpty())
            {
                model.ActionName = (string)helper.ViewContext.RouteData.Values["action"];
            }

            helper.RenderPartial(templateName, model, helper.ViewDataContainer.ViewData);
        }