SqlDataReader dr = scmd.ExecuteReader(); if (dr.Read()) { TextBoxTA1.Text = dr["TOTASSETS"].ToString(); TextBoxTL1.Text = dr["TOTLIABILITY"].ToString(); TextBoxUNA1.Text = dr["UNRNETASSETS"].ToString(); TextBoxPRNA1.Text = dr["NonExppermresAssets"].ToString(); TextBoxTR1.Text = dr["TotalRev"].ToString(); TextBoxTFN1.Text = dr["TuitFees"].ToString(); TextBoxCD1.Text = dr["CurrDebt"].ToString(); TextBoxLDT1.Text = dr["LongTermDebt"].ToString(); int a = Convert.ToInt32(TextBoxTA1.Text); int b = Convert.ToInt32(TextBoxTL1.Text); TextBoxTNA1.Text = Convert.ToString(a - b); int a1 = Convert.ToInt32(TextBoxUNA1.Text); int b1 = Convert.ToInt32(TextBoxPRNA1.Text); TextBoxTNAS1.Text = Convert.ToString(a1 + b1); } dr.Close(); con.Close();
TextBox1.Text = floatVar.ToString("#0.00"); //suppose you have a float or double variable
string.Format("{0:c}", value)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)