JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the RegularExpressionValidator Class

As discussed in the In Depth section of this chapter, you can use regular expression validators to check if the value of a data-entry control matches the pattern specified by a regular expression. This control is supported by the RegularExpressionValidator class, and here is the inheritance hierarchy of this class:


You can find the notable public properties of RegularExpressionValidator objects in Table 18.8. (This class has no non-inherited methods or events.) Note that as with other Web server controls, I am not listing the notable properties, methods, and events this class inherits from the Control and WebControl classes—you can find them in Chapter 15, Tables 15.1 to 15.5. This class inherits the BaseValidator class, which you can find in Tables 18.2 and 18.3, as well as the Label class; the Label class has only one non-inherited public member—the Text property, which holds the text the label displays.

Table 18.8: Noteworthy public properties of RegularExpressionValidator objects.




Gets/sets the regular expression you want to match data against for validation.

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor