Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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");
 }