1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to change 3023788006 to 3,023,788,006 ?

Discussion in 'C#' started by gogiants, Nov 17, 2009.

  1. #1
    I want to add "," to 3023788006 to become 3,023,788,006
    Please help by a simple easy way.

    Thanks
     
    gogiants, Nov 17, 2009 IP
  2. dgxshiny

    dgxshiny Greenhorn

    Messages:
    65
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    23
    #2
    double x = 3023788006;
    string output = x.ToString("#,##0");


    output then is 3,023,788,006
     
    dgxshiny, Nov 18, 2009 IP
  3. gogiants

    gogiants Peon

    Messages:
    357
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I need asp classic.
    thanks
     
    gogiants, Nov 18, 2009 IP
  4. same

    same Greenhorn

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    If you are doing this in asp.net then their is split() function so it will give you that one

    split(" ,") and with you number............hope may help you
     
    same, Nov 18, 2009 IP
  5. gogiants

    gogiants Peon

    Messages:
    357
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Finally I found one good way.

    numberX=3023788006
    response.write FormatNumber(numberX , 0)
    output is 3,023,788,006

    response.write FormatNumber(numberX , 2)
    output is 3,023,788,006.00

    Thanks
     
    gogiants, Nov 19, 2009 IP