"Show currency" is kind of vague....as "does not work"....I bet it works
just does not give you result you want :)
After you did reader[1].ToString() it becomes string and you can not apply
{0:c} to it. Since it only applicable to Decimal datatypes (numerics
probably too).
Not sure why you doing it that way
lblPreco.Text = reader.GetDecimal(1).ToString("c") should work...
Plus it's much faster ....
George.
"Paulo" <er********@terra.com.brwrote in message
news:eG**************@TK2MSFTNGP05.phx.gbl...
Hi, I need to show on a label the data coming from db and it must show a
currency... I'm using a SqlDataReader reader, but doesnt work...
lblPreco.Text = Eval(reader[1].ToString(), "{0:c}");
Can you help me ? Thanks!
VS 2005 asp.net C# 2.0