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 540:	Protected Sub GetSelectionsFromQueryStringQS()
Line 541:		Call ClearSelections()
Line 542:		If Request.QueryString("CatID") <> "" Then selectedCatId = Request.QueryString("CatId")
Line 543:		If Request.QueryString("City") <> "" Then selectedCity = Request.QueryString("City")
Line 544:		If Request.QueryString("State") <> "" Then selectedState = Request.QueryString("State")

Source File: C:\Buscafacil\RealEstate\Search.aspx.vb    Line: 542

Stack Trace:


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

[InvalidCastException: Conversion from string "-1,-1" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +275
   RealEstate_Search.GetSelectionsFromQueryStringQS() in C:\Buscafacil\RealEstate\Search.aspx.vb:542
   RealEstate_Search.Page_Load(Object sender, EventArgs e) in C:\Buscafacil\RealEstate\Search.aspx.vb:173
   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