Regular expression to have combination of UpperCase and LowerCase Alphabets

Last Reply on Nov 18, 2013 03:06 AM By Mudassar

Posted on Nov 18, 2013 03:03 AM

Hi,

I have to apply a validation to accept only combination of Upper and Lower case to textbox but not either complete lower or complete upper or anything else. 

I am using below code but it allows complete upper and complete lower. 

Please help to get this resolved. 

Thanks,

Vidya

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<table>
<tr>
<td>First Name:</td>
<td><asp:TextBox ID="txtFirstname" runat="server"></asp:TextBox></td>
<td><asp:RegularExpressionValidator ID="revFirstName" runat="server" 
ControlToValidate="txtFirstname" ValidationExpression="^[a-zA-Z]+$" 
ErrorMessage="Only combination of Upper and lower allowed" Display="Dynamic">
</asp:RegularExpressionValidator>
</td>
</tr>
</table>
<asp:Button ID="cmdSubmit" runat="server" Text="Submit" />
</asp:Content>

 

I agree, here is the link: http://e-iceblue.com/free-api