Hi,
String formatting is probably what you are looking for, something like:
Decimal d=0.733812949640288M;
Response.Write(String.Format("{0:0.##}%",d));
Here you'll find more details:
http://msdn.microsoft.com/library/de...ttingtypes.asp
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Keith" <kc****@hotmail.com> wrote in message
news:Om**************@tk2msftngp13.phx.gbl...
Is there a way to trim the number of digits that are returned from a
calculation? Currently the result is displayed in a label and looks like
the number below:
0.733812949640288
I would like to just return 73 and then I could concatenate a % at the end.
I have tried the Trim function without any success. Any help is
appreciated.
Thanks,
Keith