Link to home
Start Free TrialLog in
Avatar of allelopath
allelopath

asked on

Format table cell in DataList to 2 decimal places

In a DataList, I have a table cells like so:
<%#Convert.ToString(DataBinder.Eval(Container.DataItem, "TotalAmount"))%>
<%#Convert.ToDecimal(DataBinder.Eval(Container.DataItem, "DepositAmount"))%>

Open in new window

It displays numbers to 4 decimal places, like 123.4500. I want only 2 decimal places - 123.45.
How do I get this?
SOLUTION
Avatar of pateljitu
pateljitu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial