asp.net.ph

RangeValidator Class

System.Web.UI.WebControls Namespace


Checks whether the value of an input control is within a specified range of values.

RangeValidator Class Members

Collapse   Constructors

Visibility Constructor Parameters
public RangeValidator ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public MaximumValue String [ Get , Set ]
public MinimumValue String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected AddAttributesToRender ( HtmlTextWriter writer ) Void
protected ControlPropertiesValid ( ) Boolean
protected EvaluateIsValid ( ) Boolean

Remarks

The RangeValidator server control tests whether an input value falls within a given range. It uses three key properties to perform its validation:

The MinimumValue and MaximumValue are stored as string values, but are converted to the data type defined by the Type property when the validation operation is performed.

NOTE: The RangeValidator control throws an exception if the value specified by the MaximumValue or MinimumValue property cannot be converted to the specified Type.

NOTE: Validation succeeds if the input control is empty. To force the user to enter data into the input control, use a RequiredFieldValidator.

For examples illustrating use of this control, see the individual member types of this class. For syntax information, see RangeValidator in ASP.NET Syntax for Validation Controls.

See Also

BaseValidator   BaseCompareValidator   Validating Against a Range of Values Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph