|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Round to 2 decimals in a DatalistHi,
I am creating a datalist and have the following lines of code: <tr><td>'<%#DataBinder.Eval(Container.DataItem, "PBBLS")%>'</td></tr> <tr><td>'<%#DataBinder.Eval(Container.DataItem, "SBBLS")%>'</td></tr> I need to round PBBLS and SBBLS up to 2 decimal places. There are currently 4. I am getting these values from an OleDb Connection inside of a table. Any help would be appreciated. Thanks! system.math.round
Thanks, Seth Rowe Christine wrote: Show quoteHide quote > Forgot to add that I am of course using VB.NET. I changed the code to:
'<%#Math.Round(DataBinder.Eval(Container.DataItem, "PBBLS"), 2)%>' And it works great! Thanks.
Drop your pants and grab your ankles..its VISTA!
Combo Boxes in Datagrids Detecting the browser once IE7 comes out Seeking info on httpweblistener.... vb.net 2003 ... Global Formatting ? Bad practice with Enumerations.... How to find my information Can we determine at runtime if app is Console or Windows? How to lock a text file? How to debug program error on Windows with another language? |
|||||||||||||||||||||||