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)

'Declaration
Public Sub RequireField ( _
	field As String, _
	errorMessage As String _
)
'Usage
Dim instance As ValidationHelper 
Dim field As String 
Dim errorMessage As String

instance.RequireField(field, errorMessage)

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: