Length Validation with Regular Expressions in ASP.NET or

length validator in asp.net

<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
<td colspan="2">
<asp:TextBox Width="250px" ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" ForeColor="Red" runat="server"
ControlToValidate="Password" ErrorMessage="Required" ValidationGroup="Login2"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
ControlToValidate="Password" ForeColor="Red" ErrorMessage="Minimum length is 8" ValidationGroup="Login2" ValidationExpression=".{8}.*" />

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions