Results 1 to 2 of 2

Thread: Masking a String?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    261

    Masking a String?

    I am using a gridview and I want to mask the string that comes in as a phone number such as (###) ###-#### . If I have a numeric value I can format it using standard numeric formatting as follows:

    <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Sales", "{0:c}") %>'></asp:TextBox>

    If there a similar formatting function for formatting strings?

    Thanks in advance

  2. #2
    Junior Member
    Join Date
    Mar 2006
    Posts
    25

    Re: Masking a String?

    why not just convert string phone number to a double and you can freely format it using String.Format

    it might not be a good solution, but it works.
    Help Me Help You.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width