insert comma

Discussion in 'ASP .Net Web Controls' started by susie, Oct 31, 2003.

  1. susie

    susie Guest

    How to insert comma to a number entered into a textbox?

    Say if the number entered is 10000000000, when user press
    enter key, the text in the textbox will be changed to
    1,0000,000,000.


    Thank you.
    susie, Oct 31, 2003
    #1
    1. Advertising

  2. susie

    HD Guest

    check the length and String.Insert the string and put it togather with comma
    char
    say calculate the length and start from right to left.
    10000000000
    use
    str = str.Insert(1,",");
    str is now 1,0000000000
    str = str.Insert(6, ",");
    str is now 1,0000,000000
    Keep going,

    Regards,

    HD
    Use custom length marker and say
    "susie" <> wrote in message
    news:064601c39fc7$dc416f50$...
    > How to insert comma to a number entered into a textbox?
    >
    > Say if the number entered is 10000000000, when user press
    > enter key, the text in the textbox will be changed to
    > 1,0000,000,000.
    >
    >
    > Thank you.
    HD, Oct 31, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cannontrodder
    Replies:
    1
    Views:
    722
    cannontrodder
    Jul 25, 2006
  2. Replies:
    1
    Views:
    448
  3. Replies:
    1
    Views:
    1,780
    Albert Hopkins
    Dec 6, 2008
  4. eli m

    Insert comma in number?

    eli m, Mar 6, 2013, in forum: Python
    Replies:
    6
    Views:
    131
    Peter Otten
    Mar 7, 2013
  5. John Posner

    Re: Insert comma in number?

    John Posner, Mar 7, 2013, in forum: Python
    Replies:
    0
    Views:
    105
    John Posner
    Mar 7, 2013
Loading...

Share This Page