Validating integer with regularexpressionvalidator

That example was only intended to illustrate how quickly a control can be created through the use of inheritance, so it was quite limited.

In this case I don't want to use a User Control, since I am inheriting from an existing control, so I am going to delete that file and just add a new class file.

Sample 1b: Adding Regular Expression Validation an Alternative Way Summary Two samples are covered in this article: creating a custom Text Box that performs regular expression validation, and creating an extender provider that uses a different method to perform the same regular expression validation.

In the overview article, I showed you how to quickly enhance the Text Box control to accept only numeric data, creating a new control with a minimum amount of work on your part.

With just that little bit of code I have already created my own version of the Text Box by inheriting from the existing control.

Since I haven't added any of my own code, this new control would look and behave exactly like a regular Text Box; inheriting does not change anything until you start adding code or attributes.

Search for validating integer with regularexpressionvalidator:

validating integer with regularexpressionvalidator-46validating integer with regularexpressionvalidator-32validating integer with regularexpressionvalidator-37

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating integer with regularexpressionvalidator”

  1. Once you are in a conversation focus on what you like, share it with the other caller, and ask questions about what they like. Try it out with different people to see what works best.