private Init ( HtmlHelper html, string actionName = null, string controllerName = null, object routeValues = null, FormMethod method = FormMethod.Post, object htmlAttrs = null, FormType formType = null ) : void | ||
html | HtmlHelper | |
actionName | string | |
controllerName | string | |
routeValues | object | |
method | FormMethod | |
htmlAttrs | object | |
formType | FormType | |
return | void |
private void Init(HtmlHelper html, string actionName = null, string controllerName = null, object routeValues = null,
FormMethod method = FormMethod.Post, object htmlAttrs = null, FormType? formType = null)
{
var attrs = new HtmlAttributes(htmlAttrs);
if (formType != null) attrs["class"] += "form-" + formType.ToString().ToLower();
if (html == null) return;
_form = html.BeginForm(actionName, controllerName, new RouteValueDictionary(routeValues), method, attrs.ToDictionary());
}