I have a value I am retrieving from a database. I am assigning the value to a text box on my asp.net form. The field in the database is a money value. I want the below result.
Database Value Result Value
0.000000 0.00
I have tried the following
string s = string.Format("{0:c}", rdr["myValue"].ToString());
this.myTextBox.text = s;
and
string s = string.Format("{0:#,0.00}", rdr["myValue"].ToString());
this.myTextBox.text = s;
But neither works.
Any ideas?
you can also try string.Format("{0:C}", rdr["myValue"].ToString())