示例#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);
        }
示例#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);
        }