Number formatting

Discussion in 'ASP .Net' started by rguti, Jun 10, 2004.

  1. rguti

    rguti Guest

    I have a web form. I would like to format a numeric field. For example if
    they type in 3,400.33 to format the control to $ 3,400.33 while they're
    typing, basically the same as in many windows programs. Is this possible?
    thanks
    rguti, Jun 10, 2004
    #1
    1. Advertising

  2. On Thu, 10 Jun 2004 14:11:48 -0400, rguti
    <> wrote:

    > I have a web form. I would like to format a numeric field. For example if
    > they type in 3,400.33 to format the control to $ 3,400.33 while they're
    > typing, basically the same as in many windows programs. Is this possible?
    > thanks
    >
    >


    If you want to do it as they type, that's Javascript. Search around on
    the web, you'd have to tie into the keypress event more than likely and
    format it yourself. You could then wrap this up in your own custom server
    control, which would automatically output the Javascript. Perhaps someone
    else here has done it, or I'm sure there's some 3rd party controls out
    there. Otherwise do a little Google'ing and I'm sure you'll find some
    ideas quickly.

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Jun 10, 2004
    #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. Luis Esteban Valencia

    Formatting decimal number

    Luis Esteban Valencia, Jan 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    524
    Philip Q [MVP]
    Jan 12, 2005
  2. probashi

    Number Formatting Question C#

    probashi, Feb 23, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    15,945
    Karl Seguin
    Feb 23, 2005
  3. thomson

    Number Formatting

    thomson, Aug 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    347
  4. Thor W Hammer

    Formatting a number without rounding

    Thor W Hammer, Nov 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    488
    Karl Seguin
    Nov 22, 2005
  5. Replies:
    1
    Views:
    2,951
    =?Utf-8?B?Y2xpY2tvbg==?=
    Mar 22, 2006
Loading...

Share This Page