I am reading a value from datareader and displaying it into textbox. Say i am reading the value as 20.3421
from database and I want to display it as $20.34 in textbox (money format).
My code is given below.
txtCashAmount.Text = sdrData["cus_cur_MaximumCashAmount"];
Note: sdrData is the name of my sqldatareader

Niradhip ChakrabortyRank #429 · 5.8K reputationPosted May 28, 2008, 9:46 PM EDT
txtCashAmount.Text = Convert.ToDouble(sdrData["cus_cur_MaximumCashAmount"]).ToString("C");