|
 |
asptoday_discuss thread: Re: Textbox with Number / Currency Property
Message #1 by "Patrick Ames" <patrick00@n...> on Thu, 6 Sep 2001 10:04:58
|
|
> How can I force textbox to display numbers in standard / currency format
> (with comma and decimal)after hitting the enter or tab key? Is there a
> way in doing this?? Thanks.
I assume the form that holds the number is being posted to a database and
then displayed in a results page?
If so set the field in the database that is to hold the number to an
Integer.
When you call this info from the databse to display use the following
format
Response.write "Cost £" & formatnumber(rs("fieldname"),2)
This will display the results with two decimal places for you.
Message #2 by hkchang@h... on Thu, 6 Sep 2001 17:26:17 +0800
|
|
Or you can use formatcurrency(rs("fieldname"))
Regards,
HK Chang
> -----Original Message-----
> From: Patrick Ames [SMTP:patrick00@n...]
> Sent: Thursday, September 06, 2001 6:05 PM
> To: ASPToday Discuss
> Subject: [asptoday_discuss] Re: Textbox with Number / Currency
> Property
>
> > How can I force textbox to display numbers in standard / currency
format
>
> > (with comma and decimal)after hitting the enter or tab key? Is
there a
> > way in doing this?? Thanks.
>
> I assume the form that holds the number is being posted to a database
and
> then displayed in a results page?
>
> If so set the field in the database that is to hold the number to an
> Integer.
> When you call this info from the databse to display use the following
> format
>
> Response.write "Cost =A3" & formatnumber(rs("fieldname"),2)
>
> This will display the results with two decimal places for you.
>
|
|
 |