Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Phone Number validation

$
0
0

Hi All.

I have one Scenario..here i have to validate the phone number in Us Format.

Please see attached screen shot's:

Initially this is the text box.When i click on inside text box,plz see below screen shot.

here if i type the numbers it will take automatically in US Format.Plz see below screen shot.

I tried below like this it's not working. Can any one suggest me how to do this one.

<asp:TextBox ID="txtphone" runat="server" CausesValidation="true"></asp:TextBox>

<asp:RegularExpressionValidator ID="revphno" runat="server" CssClass="Validationstyle" ControlToValidate="TextBox1" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">please enter a valid phone number</asp:RegularExpressionValidator>

Thanks In Advance.....


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>