Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello I have following label I was wondering what would be the best way to display lets say 3 digits after the decimal point.
ASP.NET
<asp:Label ID="Label5" runat="server" CssClass="pos_rite" Text='<%# Eval("color")%>' >


Thanks for your suggestions
Posted
Updated 26-Nov-11 19:34pm
v2

1 solution

Specify a format for the string http://msdn.microsoft.com/en-us/library/2d76z3ck.aspx[^]

Something like this
Eval(Container.DataItem, "color", {"0:0.000"})
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900