ASP validation controls

I need to apply a set of business rules to two textboxes.   Any suggestions on how to implement and which ASP validation control or controls to use?   I have an Agency ID and an County ID textbox.  The rules are:

    1) County ID <> agency ID
    2) Agency ID starts with "01" or "02"; Agency ID is 6 digits exactly and numeric only.
    3) Neither can be "000000", "111111", "222222", etc.
    4) Neither can be "123456", "987654", etc.  Any series of sequential numbers/characters.
    5) County ID is alphanumeric, must be at least 6 characters and not more than 20 characters.
LVL 1
HLRosenbergerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun KlineLead Software EngineerCommented:
You can use the CompareValidator for #1 and a RegularExpressionValidator for 2 - 5. If you wish to do it all in one validator, the CustomValidator is your best option.
jshesekCommented:
Here's a page I referenced when I had to do custom validation:
https://msdn.microsoft.com/en-us/library/ms972966.aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HLRosenbergerAuthor Commented:
thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.