When I enter value 100 into text-box.
It should display the value like "$100.00"
What is code behind it.??
Change value integer to currency with decimal
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 6, 2014, 11:58 PM EST
textBox1.Text = "$" + d.ToString("c").Substring(1);
If the textbox doesn't contain a valid number, this code should set it to $0.00.
Angel Princess100 reputationPosted Feb 6, 2014, 8:24 PM EST
Angel Princess100 reputationPosted Feb 10, 2014, 6:46 PM EST