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 240:            sWord = Right(sWord, Len(sWord) - 1)
Line 241:            sTMP = Mid(sWord, 1, iCharLen)
Line 242:            sTMP = GetNewVal(CInt(sTMP), iRand, False)
Line 243:            Decrypt = Decrypt & Chr(sTMP)
Line 244:            sWord = Right(sWord, Len(sWord) - iCharLen)

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

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.ToInteger(String Value) +92

[InvalidCastException: Conversion from string "" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +248
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value) +1049
   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:242
   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