public static ComponentBuilder <MvcBootstrapConfig <TModel>, Form> Form <TComponent, TModel>( this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, string actionName, string controllerName, FormMethod method = FormMethod.Post, object routeValues = null) where TComponent : Component, ICanCreate <Form> { return(helper.Form() .SetAction(actionName, controllerName, routeValues) .SetFormMethod(method)); }
public static ComponentBuilder <MvcBootstrapConfig <TModel>, Form> Form <TComponent, TModel>( this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, FormMethod method) where TComponent : Component, ICanCreate <Form> { return(helper.Form() .SetAction(null) .SetFormMethod(method)); }
// Form public static ComponentBuilder <MvcBootstrapConfig <TModel>, Form> Form <TComponent, TModel>( this BootstrapHelper <MvcBootstrapConfig <TModel>, TComponent> helper, ActionResult result, FormMethod method = FormMethod.Post) where TComponent : Component, ICanCreate <Form> { return(new ComponentBuilder <MvcBootstrapConfig <TModel>, Form>(helper.GetConfig(), helper.Form().GetComponent()) .SetAction(result) .SetFormMethod(method)); }