-
Currency Help...decimal etc...
Help, please! I am stuck on a problem. I am trying to multiply to textboxes
and put the result in a currency format...I understand in VB.net there is
not a currency format. Yet, when my qtytextbox * pricetextbox...in my total
textbox I do not get any zeros.
IE...30(qtytextbox) * 12.95(pricetextbox) my total is 388.5
How do I make it read 388.50?
Can ya please help?
q = QtyTextBox.Text
p = PriceTextBox.Text
TotalTextBox.Text = q * p
That is what I have...Please help!
Peace,
Wayne
-
Re: Currency Help...decimal etc...
Use the ToString method and pass in a format string as the parameter:
__Total = QtyTextBox * PriceTextBox
__Total.ToString(__Format);
I don't have the format off hand, but that is a way of doing it.
"Wayne" <Wburrini@yahoo.com> wrote in message
news:3dc1e634$1@tnews.web.devx.com...
>
> Help, please! I am stuck on a problem. I am trying to multiply to
textboxes
> and put the result in a currency format...I understand in VB.net there is
> not a currency format. Yet, when my qtytextbox * pricetextbox...in my
total
> textbox I do not get any zeros.
> IE...30(qtytextbox) * 12.95(pricetextbox) my total is 388.5
> How do I make it read 388.50?
>
> Can ya please help?
>
> q = QtyTextBox.Text
> p = PriceTextBox.Text
> TotalTextBox.Text = q * p
> That is what I have...Please help!
>
> Peace,
> Wayne
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks