Solved

make sure value of text box appears as currency

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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