code_junkie

Best way to display/format SQL 2005 money data type in ASP.Net

Nov 10th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. txtPayment.Text = dr["Payment"].ToString("00.00")
  2.  
  3. this.txtPayment.Text = dr["Payment"].ToString("c");
  4.  
  5. string pmt = dr["Payment"].ToString();
  6. double dblPmt = System.Convert.ToDouble(pmt);
  7. this.txtPayment.Text = dblPmt.ToString("c",CultureInfo.CurrentCulture.NumberFormat);
Add Comment
Please, Sign In to add comment