Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Simple formatting question...

Reply
Thread Tools

Simple formatting question...

 
 
The Eeediot
Guest
Posts: n/a
 
      11-22-2004
How do I get a number like "131" to appear in a currency format like "$131.00" in a TextBox control?

I know it's simple but I cannot find how to do this in any reference manual.

TIA....
 
Reply With Quote
 
 
 
 
=?Utf-8?B?c2FyYQ==?=
Guest
Posts: n/a
 
      11-22-2004
add a maskedEdite control and set the format you want
to add this rigth clik toolbox and choose customise toolbox you will find
this control

"The Eeediot" wrote:

> How do I get a number like "131" to appear in a currency format like "$131.00" in a TextBox control?
>
> I know it's simple but I cannot find how to do this in any reference manual.
>
> TIA...

 
Reply With Quote
 
 
 
 
The Eeediot
Guest
Posts: n/a
 
      11-22-2004
Hmmm.

That might work if I were using Visual Studio.NET but I'm using Web Matrix.

I ended up improvising by using:

txtTotalSalesYTD.Text = "$" & String.Format("{0:F2}",
CDbl(dreader("TotalSales")))

"sara" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> add a maskedEdite control and set the format you want
> to add this rigth clik toolbox and choose customise toolbox you will find
> this control
>
> "The Eeediot" wrote:
>
> > How do I get a number like "131" to appear in a currency format like

"$131.00" in a TextBox control?
> >
> > I know it's simple but I cannot find how to do this in any reference

manual.
> >
> > TIA...



 
Reply With Quote
 
=?Utf-8?B?QmlsbCBCb3Jn?=
Guest
Posts: n/a
 
      11-22-2004
Tostring takes standard formatting, so slightly simpler:
cdbl(dreader("TotalSales")).tostring("c")

Bill

"The Eeediot" wrote:

> Hmmm.
>
> That might work if I were using Visual Studio.NET but I'm using Web Matrix.
>
> I ended up improvising by using:
>
> txtTotalSalesYTD.Text = "$" & String.Format("{0:F2}",
> CDbl(dreader("TotalSales")))
>
> "sara" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > add a maskedEdite control and set the format you want
> > to add this rigth clik toolbox and choose customise toolbox you will find
> > this control
> >
> > "The Eeediot" wrote:
> >
> > > How do I get a number like "131" to appear in a currency format like

> "$131.00" in a TextBox control?
> > >
> > > I know it's simple but I cannot find how to do this in any reference

> manual.
> > >
> > > TIA...

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT xml to xml simple question about formatting kbozek@yahoo.com XML 1 06-07-2007 10:48 PM
Simple string formatting question Steven D'Aprano Python 7 04-07-2006 01:57 PM
Another Simple Question, Dynamic formatting Chris ASP .Net 1 01-03-2004 01:23 AM
Need formatting options menu for formatting hard drive Mark T. Computer Support 3 11-24-2003 11:50 PM
Re: Simple hex formatting question xarax Java 5 08-29-2003 05:49 AM



Advertisments