Monday, 12 March 2012

validation control expression logic tips asp.net

Asp.net c# validation expression logic:


[a-zA-Z0-9]+(((![$%@])||([a-zA-Z' '])){1,500})

[a-zA-Z0-9] --> should start with these letter only
[$%@] --> char in this part will not allow
[a-zA-Z' '] --> char in this part will allow
{1,500} --> min 1 char and 500 max