How to print a currency value in a template?

G

Guest

Hi, i'm searching for a way to print a price in a template and when the price
is 0 not to print a price. I think i could do it with a formatstring or with
a condition in the template. But i can't find a way. Can anybody send me a
sample of the syntax?
This is what i try, it works fine with a decimal but how it looks for a
currency value({0:c} :
<%# String.Format("{0:#0;(#0);<zero>}", DataBinder.Eval Container.DataItem,
"GOUnitCost")) %>
 

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

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,211
Latest member
NelleWilde

Latest Threads

Top