Click here to Skip to main content
15,891,597 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i validate a PAN Number using Regular expression
Posted

 
Share this answer
 
Comments
srilekhamenon 24-Dec-11 1:45am    
Thankx;)
Monjurul Habib 24-Dec-11 1:47am    
welcome :)
Use
C#
<asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" xmlns:asp="#unknown">
ErrorMessage="PAN Format is not correct" ControlToValidate="txtPanNo" 
ValidationExpression="[A-Za-z]{5}\d{4}[A-Za-z]{1}">
</asp:regularexpressionvalidator>


Useful links
http://www.dotnetfunda.com/codes/code1522-validate-indian-pan-number-using-regular-expression.aspx
http://www.codeproject.com/KB/dotnet/regextutorial.aspx
 
Share this answer
 
Comments
srilekhamenon 24-Dec-11 1:45am    
Thankx;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900