/// <summary> /// Creates a builder for creating a <button> tag /// </summary> public static IButtonBuilder BuildButton(this HtmlHelper htmlHelper, string buttonText, Action<IButtonBuilder> builderExpression) { IButtonBuilder builder = htmlHelper.BuildButton(buttonText); if ( builderExpression != null ) { builderExpression.Invoke(builder); } return builder; }
/// <summary> /// Creates a builder for creating a <button> tag with [type="submit"] /// </summary> public static IButtonBuilder BuildSubmitButton(this HtmlHelper htmlHelper, string buttonText) { return htmlHelper.BuildButton(buttonText).Submit(); }
/// <summary> /// Creates a builder for creating an <input> tag with [type="button"] /// </summary> public static IButtonBuilder BuildInputButton(this HtmlHelper htmlHelper, string buttonText) { return htmlHelper.BuildButton(buttonText).Prop("tagName", "input").DefaultAttr("type", "button"); }