how to set allow alphabetic characters only using Regular Expression Validator control in vB

Posted by Gow.Net under ASP.NET on 2/29/2012 | Points: 10 | Views : 9658 | Status : [Member] | Replies : 2
how to set textbox allow alphabetic characters only using Regular Expression Validator control in vB

gowthaman8870226416


Responses

Posted by: Hmanjarawala on: 2/29/2012 [Member] Bronze | Points: 25

Up
0
Down
develope Regular Expression like "\^[aA-zZ]*$\"

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 2/29/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,
Try this for alphanumeric
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"

ControlToValidate="TextBox1" ErrorMessage="letters only"

ValidationExpression="^[0-9a-zA-Z]{5,7}$"></asp:RegularExpressionValidator>

ValidationExpression="^[0-9a-zA-Z]{5,10}$"
here [5,10] indicates 5 to 10 characters

Thanks,
Sanjay

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response