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 97: 
Line 98: 'BLOCCO LISTA IMMOBILI
Line 99: Dim page as Integer=request.QueryString("pg") 
Line 100:Dim npage as integer
Line 101:strsql="SELECT COUNT(*) FROM immobili WHERE immobili.cod_cat='" & cat & "' ORDER BY data DESC;"

Source File: D:\inetpub\webs\casamiamarcheit\_ita\lista_ita.aspx    Line: 99

Stack Trace:


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

[InvalidCastException: Conversion from string "1pic=1" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +257
   ASP._ita_lista_ita_aspx.Page_Load(Object sender, EventArgs e) in D:\inetpub\webs\casamiamarcheit\_ita\lista_ita.aspx:99
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2603


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8974