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 1764:                        Datos[3] = "<span style='color:Green;'>" + ((SesionId.ToDecimal(drvRowCom["NetIcncome"].ToString()) * 1000000) / Acciones).ToString("N2") + " €</span>";
Line 1765:                    else
Line 1766:                        Datos[3] = "<span style='color:Red;'>" + ((SesionId.ToDecimal(drvRowCom["NetIcncome"].ToString()) * 1000000) / Acciones).ToString("N2") + " €</span>";
Line 1767:
Line 1768:

Source File: \\vid4582.nas1.lan\vid4582\Webs\Plataforma\App_Code\Valores.cs    Line: 1766

Stack Trace:


[DivideByZeroException: Attempted to divide by zero.]
   System.Decimal.FCallDivide(Decimal& d1, Decimal& d2) +0
   System.Decimal.op_Division(Decimal d1, Decimal d2) +23
   ValoresInfo.CargoDatosFundamentales() in \\vid4582.nas1.lan\vid4582\Webs\Plataforma\App_Code\Valores.cs:1766
   Home.CargoPagina() in \\vid4582.nas1.lan\vid4582\Webs\Plataforma\HomeMovCLS.aspx.cs:1014
   Home.Page_Load(Object sender, EventArgs e) in \\vid4582.nas1.lan\vid4582\Webs\Plataforma\HomeMovCLS.aspx.cs:139
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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