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