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 227:        End Select
Line 228:        If check Then
Line 229:            If (CInt(lblCurrentProductTo1.Text) >= CInt(lblTotalProductsOnPage1.Text)) Or drpCount.SelectedValue = "1000" Then
Line 230:                lblCurrentProductTo1.Text = lblTotalProductsOnPage1.Text
Line 231:                lblCurrentProductTo2.Text = lblTotalProductsOnPage1.Text

Source File: C:\websites\eDecks\deptcat.aspx.vb    Line: 229

Stack Trace:


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

[InvalidCastException: Conversion from string "" to type 'Integer' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) +299
   deptcat.CalcProductsBeingShown() in C:\websites\eDecks\deptcat.aspx.vb:229
   deptcat.Page_Load(Object sender, EventArgs e) in C:\websites\eDecks\deptcat.aspx.vb:152
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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