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 IHtmlString Submit(this HtmlHelper helper, Dictionary <string, string> htmlAttributes) { var element = string.Format("<input {0} ></input>", HtmlMethods.attribute("type", "submit") ); foreach (var v in htmlAttributes) { element = HtmlMethods.AddOrUpdateAttribute(element, v.Key, v.Value); } return(new HtmlString(Layout.Format(element))); }