Author: jaminxz | Posted on: 3/18/2009 9:50:17 AM | Views : 315

Hi, i'm new so i'm just getting familiar with .net and the math.round function. I'm using a custom control i got from here:  http://aspnet.4guysfromrolla.com/articles/081308-1.aspx
basically  what it does  is display the data from a database field in a label. One of my fields returns an unpretty float which i want to use the math.round function on to display. I'm trying to do something like this but cant quite figure out the syntax as i dont think its possible to put <% > inbetween the cc1 tags:

 
<cc1:databoundlabel id="LblHours" runat="server" DataSourceID="EngineInfo"
     DataTextField="<%# System.Math.Round(Convert.ToDouble(Eval("totalhour"))).ToString() %>'>"
    Font-Bold="True" Font-S ...

Go to the complete details ...