Solved

VB.Net: Textbox currency format

Posted on 2012-04-03
2
962 Views
Last Modified: 2012-04-04
Hi Experts,

I am using vb.net.

I wanted to set a textbox to a currency format. but i could not find it in the properties.

Could you please give me the code to make the textbox in currency format.

Thanks in advance.
0
Comment
Question by:baabaa_nl
2 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 250 total points
ID: 37803445
Assuming data binding, you should be able to set the FormatString property:

TextBox1.DataBindings.Item(0).FormatString = "C"

Open in new window


If not databinding, then you just assign the string to the text property:

TextBox1.Text = CurrencyValue.ToString("C")

Open in new window

0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 37805318
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.

831 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