double dblAmt;
string curCulture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString();
System.Globalization.NumberFormatInfo currencyFormat = new System.Globalization.CultureInfo(curCulture).NumberFormat;
currencyFormat.CurrencyNegativePattern = 1;
if (dsCash.Tables[0].Rows[0]["Amount"].ToString().Trim() != "")
{
dblAmt = Convert.ToDouble(dsCash.Tables[0].Rows[0]["Amount"].ToString());
lblCashAlternatives.Text = dblAmt.ToString("c", currencyFormat);
}
else
{
lblCashAlternatives.Text = "$0.0";
}
Tuesday, June 1, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment