Пример #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;
 }
Пример #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();
 }
Пример #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");
 }