Beispiel #1
0
 /// <summary>
 /// Creates a builder for creating a &lt;button&gt; 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;
 }
Beispiel #2
0
 /// <summary>
 /// Creates a builder for creating a &lt;button&gt; tag with [type="submit"]
 /// </summary>
 public static IButtonBuilder BuildSubmitButton(this HtmlHelper htmlHelper,
                                                string buttonText)
 {
     return htmlHelper.BuildButton(buttonText).Submit();
 }
Beispiel #3
0
 /// <summary>
 /// Creates a builder for creating an &lt;input&gt; tag with [type="button"]
 /// </summary>
 public static IButtonBuilder BuildInputButton(this HtmlHelper htmlHelper,
                                               string buttonText)
 {
     return htmlHelper.BuildButton(buttonText).Prop("tagName", "input").DefaultAttr("type", "button");
 }