Attempted to divide by zero.

Server Error in '/Cotizalia2017' 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 57:             try { variacion = Convert.ToDecimal(dato); } catch (Exception E) { variacion = Decimal.Zero; }; Line 58:             index++; Line 59:             rango = Math.Round(variacion * 100 / maxVariacion,2 ); Line 60:             strRango = strRango + Math.Abs(rango).ToString() + "#"; Line 61:             css = (rango > 0) ? "ifb-top" : (rango < 0) ? "ifb-flop" : "ifb-equal";

Source File: c:\Datapump\Cotizalia2017\UserControls\FichaValor\15Sesiones.ascx    Line: 59

Stack Trace:

[DivideByZeroException: Attempted to divide by zero.]   System.Decimal.FCallDivide(Decimal& d1, Decimal& d2) +0   System.Decimal.op_Division(Decimal d1, Decimal d2) +18   ASP.usercontrols_fichavalor_15sesiones_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Datapump\Cotizalia2017\UserControls\FichaValor\15Sesiones.ascx:59   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Control.Render(HtmlTextWriter writer) +12   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Control.Render(HtmlTextWriter writer) +12   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   ASP.fichavalor_master.__RendercphContent(HtmlTextWriter __w, Control parameterContainer) in c:\Datapump\Cotizalia2017\FichaValor.Master:7   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Control.Render(HtmlTextWriter writer) +12   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   ASP.maincanvas_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Datapump\Cotizalia2017\MainCanvas.Master:20   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Control.Render(HtmlTextWriter writer) +12   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Control.Render(HtmlTextWriter writer) +12   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +14   System.Web.UI.Page.Render(HtmlTextWriter writer) +30   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +67   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +101   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1342


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