Thank you for your help.
I tried the regular expression ^.{4,8}$ but even when I type in "asdf",
"1234", or "asdf1234" when I click on the submit button it keeps giving me
the error "Password must be between 4 and 8 characters in length". What did
I do wrong in the following Page1.aspx ? Thank you.
<body>
<form id="form1" runat="server">
<div>
<input id="txtPassword" runat=server type="password" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="txtPassword"
ErrorMessage="Password must be between 4 and 8 characters in length"
ValidationExpression="^.{4,8}$"></asp:RegularExpressionValidator>
<br />
<asp:Button ID="txtSubmit" runat="server" Text="Submit" /></div>
</form>
</body>
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:eG**************@TK2MSFTNGP06.phx.gbl...
You could do a regular expression. Regexlib has a great array of sample
regular expressions and you may be able to find an exact match for what
you're looking for, or get some ideas on how to make yours.
http://regexlib.com/default.aspx
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
<fi**********@gmail.comwrote in message
news:11*********************@y5g2000hsa.googlegrou ps.com...
>For a Password field I would like a Validation Control to make sure
the password contains alphanumeric and number and has 8 characters.
What Validation Control can I use for this purpose ?
Thank you.