public static IHtmlString Button(this HtmlHelper helper, string text) { var element = string.Format("<a {0}>{1}</a>", HtmlMethods.cssClass("button"), text); return(new HtmlString(Layout.Format(element))); }
public static IHtmlString Button(this HtmlHelper helper, string text, string onclick) { var element = string.Format("<a {0} {1}>{2}</a>", HtmlMethods.cssClass("button"), HtmlMethods.attribute("onClick", onclick), text); return(new HtmlString(Layout.Format(element))); }
public static IHtmlString Button(this HtmlHelper helper, string text, Dictionary <string, string> htmlAttributes) { var button = string.Format("<a {0}>{1}</a>", HtmlMethods.cssClass("button"), text); foreach (var v in htmlAttributes) { button = HtmlMethods.AddOrUpdateAttribute(button, v.Key, v.Value); } return(new HtmlString(Layout.Format(button))); }
public static string ImageTextTemplate(string direction, string left, string right) { var template = "<div {0} >\n {1}{2} </div>\n <br {3}/>"; var html = String.Format(template, HtmlMethods.cssClass("imageText " + direction), Layout.Format(left, 1, 1), Layout.Format(right, 1, 1), HtmlMethods.cssClass("clearFloat") ); return(html); }