Hi
I have the following method in place:-
Eval("UnitCost", "{0}")
This gets a required value from the UnitCost field in the DB.
However the values are showing as 17.00000 etc.
All I want is either the 17 or the 17.00 to show and not all the trailing zeros.
What amendments do I need to make to Eval("UnitCost", "{0}") in order for this to work?
Thanks!
Eval method
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Guest UserRank #4,868 · 321 reputationPosted May 23, 2012, 12:13 AM EDT
I used "{0:0.00}" and it works perfect!
SenthilkumarRank #387 · 6.5K reputationPosted May 23, 2012, 12:21 AM EDT
Ajay Patel148 reputationPosted May 23, 2012, 4:31 AM EDT
http://ajaypatelfromsanthal.blogspot.in/2012/05/eval-vs-bind-in-net.html
Enjoy.....