Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ValidationHelper.RequireField Method (String, String)

Registers the specified field as one that requires user entry and registers the specified string as the error message to display if no value is supplied.

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

public function RequireField(
	field : String, 
	errorMessage : String
)

Parameters

field
Type: System.String
The name (value of the name attribute) of the user input element to validate.
errorMessage
Type: System.String
The error message.
Show:
© 2015 Microsoft