Click or drag to resize
IFormComponentModelBinderBindComponent Method
Binds all properties of specified component. Also validates resulting component value.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
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
ExceptionCondition
ArgumentNullExceptionThrown when formComponent or formCollection is null.
See Also