IFormComponentModelBinderBindComponent Method |
Binds all properties of specified component.
Also validates resulting component value.
Namespace: Kentico.Forms.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax void BindComponent(
ControllerContext controllerContext,
FormComponent formComponent,
FormCollection formCollection,
string nameHtmlFieldPrefix,
out bool shouldValidationContinue
)
Parameters
- controllerContext
- Type: ControllerContext
Controller context of the current request. - formComponent
- Type: Kentico.Forms.Web.MvcFormComponent
Component to be bound. - formCollection
- Type: FormCollection
Source of data for the binding. - nameHtmlFieldPrefix
- Type: SystemString
Prefix used in the name attribute of the inputs belonging to formComponent to identify values in form collection. - shouldValidationContinue
- Type: SystemBoolean
Indicates whether validation should continue after component is bound.
Validation won't continue in case binding of any one of the partial values fails.
Return Value
Type:
Enumeration of validation errors, empty if validation succeeded.
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown when formComponent or formCollection is null. |
See Also