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", "$#,###.##")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top