formatting currency values

  • Thread starter Thread starter sean
  • Start date Start date
S

sean

Hi There,

I have a datalist that is returning a currency value, how can I format it? I
tried the code below but it did not work, could someone help me out with the
syntax please?

Sean - thanks in adavance for your answer


!-- code


DataFormatString="{0:$#,###.##}" DataBinder.Eval(Container.DataItem,
"listprice")
 
Hi sean,

There is an overload Eval method that accepts the format paramter as the
last one, so it should be something like:
DataBinder.Eval(Container.DataItem, "listprice", "$#,###.##")
 
Back
Top