FormContext FormContext FormContext Class

Definition

Encapsulates information that is required in order to validate and process the input data from an HTML form.

public class FormContext
type FormContext = class
Public Class FormContext
Inheritance
FormContextFormContextFormContext

Constructors

FormContext() FormContext() FormContext()

Initializes a new instance of the FormContext class.

Properties

FieldValidators FieldValidators FieldValidators

Gets the field validators for the form.

FormId FormId FormId

Gets or sets the form identifier.

ReplaceValidationSummary ReplaceValidationSummary ReplaceValidationSummary

Determines whether client validation errors should be dynamically added to the validation summary.

ValidationSummaryId ValidationSummaryId ValidationSummaryId

Gets or sets the identifier for the validation summary.

Methods

GetJsonValidationMetadata() GetJsonValidationMetadata() GetJsonValidationMetadata()

Returns a serialized object that contains the form identifier and field-validation values for the form.

GetValidationMetadataForField(String) GetValidationMetadataForField(String) GetValidationMetadataForField(String)

Returns the validation value for the specified input field.

GetValidationMetadataForField(String, Boolean) GetValidationMetadataForField(String, Boolean) GetValidationMetadataForField(String, Boolean)

Returns the validation value for the specified input field and a value that indicates what to do if the validation value is not found.

RenderedField(String) RenderedField(String) RenderedField(String)

Returns a value that indicates whether the specified field has been rendered in the form.

RenderedField(String, Boolean) RenderedField(String, Boolean) RenderedField(String, Boolean)

Sets a value that indicates whether the specified field has been rendered in the form.

Applies to