Solved

make sure value of text box appears as currency

Posted on 2011-03-21
4
231 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

17 Experts available now in Live!

Get 1:1 Help Now