Server Error in '/' Application.

Arithmetic operation resulted in an overflow.

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.OverflowException: Arithmetic operation resulted in an overflow.

Source Error:


Line 352:		Else
Line 353:			If NumDigitsAfterDecimal < 1 Then
Line 354:				MGFormatNumber = CInt(FormatNumber(theInputAmount, NumDigitsAfterDecimal))
Line 355:			Else
Line 356:				MGFormatNumber = CDec(FormatNumber(theInputAmount, NumDigitsAfterDecimal))

Source File: C:\Buscafacil\App_Code\MGDatabase.vb    Line: 354

Stack Trace:


[OverflowException: Arithmetic operation resulted in an overflow.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +110
   MGDatabase.MGFormatNumber(String theInputAmount, Int32 NumDigitsAfterDecimal) in C:\Buscafacil\App_Code\MGDatabase.vb:354
   RealEstate_ListingDisplay.Page_Load(Object sender, EventArgs e) in C:\Buscafacil\RealEstate\ListingDisplay.aspx.vb:407
   System.Web.UI.Control.OnLoad(EventArgs e) +103
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1381


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