Ask a Question related to ASP.NET General, Design and Development.
-
Eddy Soeparmin #1
Phone Format (770) 123-1234
Hi,
How do I apply phone format in a string field? for example (770) 123-1234.
Please let me know.
Thanks.
Eddy
Eddy Soeparmin Guest
-
Format Phone Number
I have a text feild (homephone) in MSAccess that hold phone numbers (410)543-3333 When I display these in a <CFOUTPUT>#HOMEPHONE#<\CFOUTPUT> the... -
Format Phone Number String in Datagrid Column
Greetings, I have a 10 digit phone number stored as a string in a SQL server table. My datagrid currently displays it as 1234567890, but I would... -
Placing an image in a Tab Fixed format without messing up the format??
I will do my best to explain the problem. First of all, this is an XP machine and I am using CS InDesign (the version of InDesign that one can... -
Phone Number Format
Ken, your regex has to be mapped to the INPUT, not the output. by including parens and dashes in the regex, you are guaranteeing that the... -
Fire IISReset command on event aspnet_wp.exe (PID: 1234) was recycled...
Dear All, I would like run a program that does an IISReset when aspnet_wp.exe (PID: 1234) was recycled...In IIS service we have a property... -
Ray Dixon [MVP] #2
Re: Phone Format (770) 123-1234
Hi Eddy,
If you are validating input, you can use a RegularExpressionValidator and
select U.S. Phone Number in the Regular Expression Editor (by clicking the
elipses in the ValidationExpression box in the RegularExpressionValidator's
Properties window).
--
Ray Dixon - Microsoft MVP
[email]ray@NOSPAM.greeble.com[/email]
(remove NOSPAM. from my e-mail address for a direct reply)
"Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
news:uCKkx2QVDHA.2068@TK2MSFTNGP11.phx.gbl...> Hi,
>
> How do I apply phone format in a string field? for example (770) 123-1234.
> Please let me know.
>
> Thanks.
>
> Eddy
>
>
Ray Dixon [MVP] Guest
-
Showjumper #3
Re: Phone Format (770) 123-1234
you'd have to use javascript to do this
"Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
news:%23CwhiETVDHA.2012@TK2MSFTNGP10.phx.gbl...(123)> Hi Ray,
>
> No, this is not at validation. It's for display. For example, I just
> retrieved data from database and would like to display phone number inand> 123-1234 format within a datagrid.
>
> Eddy
>
> "Ray Dixon [MVP]" <ray@NOSPAM.greeble.com> wrote in message
> news:uufguJSVDHA.2024@TK2MSFTNGP12.phx.gbl...> > Hi Eddy,
> >
> > If you are validating input, you can use a RegularExpressionValidatorthe> > select U.S. Phone Number in the Regular Expression Editor (by clicking> RegularExpressionValidator's> > elipses in the ValidationExpression box in the> 123-1234.> > Properties window).
> >
> >
> > --
> > Ray Dixon - Microsoft MVP
> > [email]ray@NOSPAM.greeble.com[/email]
> > (remove NOSPAM. from my e-mail address for a direct reply)
> >
> >
> > "Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
> > news:uCKkx2QVDHA.2068@TK2MSFTNGP11.phx.gbl...> > > Hi,
> > >
> > > How do I apply phone format in a string field? for example (770)>> >> > > Please let me know.
> > >
> > > Thanks.
> > >
> > > Eddy
> > >
> > >
> >
>
Showjumper Guest
-
Swanand Mokashi #4
Re: Phone Format (770) 123-1234
Function FormatPhoneNumbers(ByVal strInputPhoneNumber As String) As String
'Strip off the ( , ) and -
Dim strPhoneNumber As String
strInputPhoneNumber = strInputPhoneNumber.Replace(" ", "")
strInputPhoneNumber = strInputPhoneNumber.Replace("(", "")
strInputPhoneNumber = strInputPhoneNumber.Replace(")", "")
strInputPhoneNumber = strInputPhoneNumber.Replace("-", "")
'Now format it
If strInputPhoneNumber.Length >= 3 Then
strPhoneNumber = "(" & strInputPhoneNumber.Substring(0, 3) & ") "
If strInputPhoneNumber.Length < 6 Then
strPhoneNumber = strPhoneNumber & strInputPhoneNumber.Substring(3,
strInputPhoneNumber.Length - 3)
Else
strPhoneNumber = strPhoneNumber & strInputPhoneNumber.Substring(3,
3) & "-" & strInputPhoneNumber.Substring(6)
End If
End If
Return strPhoneNumber
End Function
--
Swanand Mokashi
Microsoft Certified Professional
[url]http://www.swanandmokashi.com/[/url]
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
news:%23CwhiETVDHA.2012@TK2MSFTNGP10.phx.gbl...(123)> Hi Ray,
>
> No, this is not at validation. It's for display. For example, I just
> retrieved data from database and would like to display phone number inand> 123-1234 format within a datagrid.
>
> Eddy
>
> "Ray Dixon [MVP]" <ray@NOSPAM.greeble.com> wrote in message
> news:uufguJSVDHA.2024@TK2MSFTNGP12.phx.gbl...> > Hi Eddy,
> >
> > If you are validating input, you can use a RegularExpressionValidatorthe> > select U.S. Phone Number in the Regular Expression Editor (by clicking> RegularExpressionValidator's> > elipses in the ValidationExpression box in the> 123-1234.> > Properties window).
> >
> >
> > --
> > Ray Dixon - Microsoft MVP
> > [email]ray@NOSPAM.greeble.com[/email]
> > (remove NOSPAM. from my e-mail address for a direct reply)
> >
> >
> > "Eddy Soeparmin" <esoeparmin@clientprofiles.com> wrote in message
> > news:uCKkx2QVDHA.2068@TK2MSFTNGP11.phx.gbl...> > > Hi,
> > >
> > > How do I apply phone format in a string field? for example (770)>> >> > > Please let me know.
> > >
> > > Thanks.
> > >
> > > Eddy
> > >
> > >
> >
>
Swanand Mokashi Guest



Reply With Quote

