user724198
user724198

Reputation:

ASP.NET Validation Expressions

I've been through the MSDN chapter on this at least 50 times.

But I'll be darned if I can figure out how to write a simple validation expression that will accept any whole number greater than zero but less than 1,000.

I really wish they had more straight-forward documentation on this.

Any help would be greatly appreciated.

Thanks, Jason

Upvotes: 1

Views: 503

Answers (1)

Richard Forrest
Richard Forrest

Reputation: 3615

The Regex expression for this would be something like this. If you want to use the RegularExpressionValidator control

^([1-9][0-9]{0,2}|1000)$

Upvotes: 1

Related Questions