FormContext Class

Visual Studio 2010

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


Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public class FormContext

The FormContext type exposes the following members.

Public methodFormContextInitializes a new instance of the FormContext class.

Public propertyFieldValidatorsGets the field validators for the form.
Public propertyFormIdGets or sets the form identifier.
Public propertyReplaceValidationSummaryDetermines whether client validation errors should be dynamically added to the validation summary.
Public propertyValidationSummaryIdGets or sets the identifier for the validation summary.

Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetJsonValidationMetadataRetrieves a serialized object that contains the form identifier and field-validation values for the form.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValidationMetadataForField(String)Retrieves the validation value for the specified input field.
Public methodGetValidationMetadataForField(String, Boolean)Retrieves the validation value for the specified input field and a value that indicates what to do if the validation value is not found.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.