Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FormContext Class

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 methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetJsonValidationMetadataReturns a serialized object that contains the form identifier and field-validation values for the form.
Public methodGetType (Inherited from Object.)
Public methodGetValidationMetadataForField(String)Returns the validation value for the specified input field.
Public methodGetValidationMetadataForField(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.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRenderedField(String)Returns a value that indicates whether the specified field has been rendered in the form.
Public methodRenderedField(String, Boolean)Sets a value that indicates whether the specified field has been rendered in the form.
Public methodToString (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.
© 2017 Microsoft