By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,492 Members | 3,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,492 IT Pros & Developers. It's quick & easy.

how to format a string (number) as currency?

P: n/a
I get a number from db and display it in a textbox control, how can i format
the value as currency?

thanks,
Juan.
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
How using decimal to store them in the database...??

Nirosh.

"Juan" <ju*****************@ANTISPAMhotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I get a number from db and display it in a textbox control, how can i format the value as currency?

thanks,
Juan.

Nov 16 '05 #2

P: n/a
string.Format("{0:C", dbValue);

are you using databinding? If so you kan hook the parse and format events
for the textbox binding and do he formatting in there.

--
Patrik Löwendahl [C# MVP]
www.cshrp.net - "Elegant code by witty programmers"

"Juan" <ju*****************@ANTISPAMhotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I get a number from db and display it in a textbox control, how can i
format
the value as currency?

thanks,
Juan.

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.