[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Format Code for phone number in VS.NET

Posted on 2006-06-20
8
Medium Priority
?
282 Views
Last Modified: 2012-08-13
Experts,

I am working in a VS.NET file.  I wanted to ask the format code for a phone number in VS.NET?

Thanks.
0
Comment
Question by:jjrr007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 10

Expert Comment

by:vadim63
ID: 16943698
Do you mean Mask?
0
 
LVL 10

Expert Comment

by:vadim63
ID: 16943749
If mask, it could be
(999) 000-0000
0
 
LVL 1

Author Comment

by:jjrr007
ID: 16944997
In VS.NET properties window.

For Example, format code N0 is numbers without a decimal point.  I have raised the points level.  
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Expert Comment

by:vadim63
ID: 16945260
My guess - you can not do it without mask. Sorry.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16945425
Try this for U.S. phone numbers:

  Dim n As Integer = 1234567890
  Dim s As String = n.ToString("(000) 000-0000")

Bob
0
 
LVL 1

Author Comment

by:jjrr007
ID: 16945639
I am using the MS Reporting Reporting Services Module in VS.NET.  

The data type is Teradata.  So using VB.NET code won't work like this without a whole lot of work.  The options that I have (that I know of area):

Change the format box from the properties window.
Change the query in Teradata
Use Transact SQL code- directly in VS.NET Reporting Services 2003


Please advise.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16945664
Good thing that you clarified that.  Good luck finding an answer :D

Bob
0
 
LVL 2

Accepted Solution

by:
Bill_PSC earned 2000 total points
ID: 16962156
You may try creating a seperate class to handle the format.

ie:

 Public Sub FormatPhone(ByVal sender As Object, ByVal e As ConvertEventArgs)
        Dim ph As String
        Try
            ph = e.Value
         e.Value = "(" + ph.Substring(0, 3) + ") " + ph.Substring(3, 3) + "-" + ph.Substring(6, 4)
        Catch
            e.Value = "Not Entered"
        End Try
    End Sub

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question