Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Defines a validation test that tests whether an integer value falls within a specific range.
Namespace: System.Web.WebPages
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Syntax
'Declaration
Public Shared Function Range ( _
minValue As Integer, _
maxValue As Integer, _
errorMessage As String _
) As IValidator
'Usage
Dim minValue As Integer
Dim maxValue As Integer
Dim errorMessage As String
Dim returnValue As IValidator
returnValue = Validator.Range(minValue, _
maxValue, errorMessage)
public static IValidator Range(
int minValue,
int maxValue,
string errorMessage
)
public:
static IValidator^ Range(
int minValue,
int maxValue,
String^ errorMessage
)
static member Range :
minValue:int *
maxValue:int *
errorMessage:string -> IValidator
public static function Range(
minValue : int,
maxValue : int,
errorMessage : String
) : IValidator
Parameters
- minValue
Type: System.Int32
The minimum value. The default is 0.
- maxValue
Type: System.Int32
The maximum value.
- errorMessage
Type: System.String
The error message to display if validation fails.
Return Value
Type: System.Web.WebPages.IValidator
The validation test.