Solved

make sure value of text box appears as currency

Posted on 2011-03-21
4
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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