How to convert Decimal result into Integer using C# in ASP.Net

Last Reply 10 months ago By YacharuP

Posted 10 months ago


see below code:

LblResult.Text = (Convert.ToDouble(Lblcredit.Text) / Convert.ToDouble(12.9)).ToString();

when I run this code result is:



I want it display in integer like


How I can convert it?

Best regards


You are viewing reply posted by: YacharuP 10 months ago.
Posted 10 months ago


Try following code...

double b = 567.123658596;
Label1.Text = b.ToString();
Label2.Text = Convert.ToInt32(b).ToString();


I agree, here is the link: