Solved

make sure value of text box appears as currency

Posted on 2011-03-21
4
242 Views
Last Modified: 2012-05-11
I have a textbox ... and when dollar amount is retrieved from the database it comes back like this

4.0000

how would i format the textbox so that it appears like a normal dollar amount:

example:

4.00
0
Comment
Question by:vbnetcoder
  • 2
4 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 500 total points
ID: 35184762
txtboxAmount.Text = Format(txtboxAmount.Text,"0.00")

0
 
LVL 33

Expert Comment

by:jppinto
ID: 35184770
txtboxAmount.Text = txtboxAmount.ToString("#0.00")
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
ID: 35185237
You can use above statement or in generic txtboxAmount.Text = txtboxAmount.ToString("##.##")
0
 

Author Closing Comment

by:vbnetcoder
ID: 35185584
ty
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now