Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 140:            Select Case Kount371
Line 141:                Case 3
Line 142:                    intSum = intSum + Mid(BaseNumber, Kount, 1) * 3
Line 143:                    Kount371 = 7
Line 144:                Case 7

Source File: D:\WWWRoot\business-team.com\www\buy-a-business\business-for-sale.aspx    Line: 142

Stack Trace:


[FormatException: Input string was not in a correct format.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +224
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +83

[InvalidCastException: Conversion from string "L" to type 'Double' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +207
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value) +12
   ASP.buy_a_business_business_for_sale_aspx.CheckDigit(Object BaseNumber) in D:\WWWRoot\business-team.com\www\buy-a-business\business-for-sale.aspx:142
   ASP.buy_a_business_business_for_sale_aspx.Decrypt(Object sWord) in D:\WWWRoot\business-team.com\www\buy-a-business\business-for-sale.aspx:227
   ASP.buy_a_business_business_for_sale_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\WWWRoot\business-team.com\www\buy-a-business\business-for-sale.aspx:262
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +270
   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.4690.0