Server Error in '/' Application.

Attempted to divide by zero.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DivideByZeroException: Attempted to divide by zero.

Source Error:


Line 262:                {
Line 263:                    int Nmpercentagevalue = Convert.ToInt32(tunednm) - Convert.ToInt32(orgnm);
Line 264:                    cardatagrid.Items[i].Cells[9].Text = (Convert.ToInt32(tunednm) - Convert.ToInt32(orgnm)) * 100 / Convert.ToInt32(orgnm) + "%";
Line 265:                }
Line 266:

Source File: c:\inetpub\vhosts\quantumtuning.com.au\httpdocs\quantumtuning.com.au\car-remap-tuning-remapping.aspx.cs    Line: 264

Stack Trace:


[DivideByZeroException: Attempted to divide by zero.]
   car_remap_tuning_remapping.setimage() in c:\inetpub\vhosts\quantumtuning.com.au\httpdocs\quantumtuning.com.au\car-remap-tuning-remapping.aspx.cs:264
   car_remap_tuning_remapping.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\quantumtuning.com.au\httpdocs\quantumtuning.com.au\car-remap-tuning-remapping.aspx.cs:30
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0