Tried this:
string txtInterestRate.Text = String.Format ("{0:P2}.00%", txtInterestRate.Text
It works if I enter something like 12, but if someone enters 12.5 it will display 12.5.00%
Still working it out, thanks for looking.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 4 of 4
Thread: Formatting a percentageThreaded View
|
Click Here to Expand Forum to Full Width |