Exemplo n.º 1
0
        public static MvcHtmlString AppActionLink(this HtmlHelper htmlHelper, string text, string href, AppColor color = AppColor.none, object htmlAttributes = null)
        {
            var control = new RenderActionLink();

            control.Text  = text;
            control.Name  = text;
            control.Color = color;
            control.Href  = href;
            control.ID    = "a" + text;

            HtmlAttributes(control, htmlAttributes);
            return(MvcHtmlString.Create(control.ToString()));
        }
Exemplo n.º 2
0
        public static MvcHtmlString AppButtonModal(this HtmlHelper htmlHelper, string text, string modalname, AppColor color = AppColor.none, object htmlAttributes = null)
        {
            var control = new RenderActionLink();

            control.Text     = text;
            control.Color    = color;
            control.IsModal  = true;
            control.ForModal = "#" + modalname;
            control.Href     = "#" + modalname;
            control.ID       = "btn-" + modalname;

            HtmlAttributes(control, htmlAttributes);
            return(MvcHtmlString.Create(control.ToString()));
        }