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 173:            sql = sql & " WHERE TotalDoubles>0  " & Gender_Sort & "And Rides_Rank>0 And Rides_Rank <=" & Request("Count")
Line 174:            'Response.Write("Sort = " & Request("Sort") & "<br>")
Line 175:            If Request("Sort") = 0 Then
Line 176:                sql = sql & " ORDER BY TotalDoubles DESC"
Line 177:            End If

Source File: C:\htdocs\CaliforniaTripleCrown.org\winnersbytotalrides\WinnerList.vb    Line: 175

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 "" to type 'Double' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +207
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value) +12
   WinnerList.Make_Winner_List_Table(Int32 SortOrder, Int32 Rider_Count) in C:\htdocs\CaliforniaTripleCrown.org\winnersbytotalrides\WinnerList.vb:175
   ASP.winnersbytotalrides_winners_rides_aspx.Page_Load() in C:\htdocs\CaliforniaTripleCrown.org\winnersbytotalrides\Winners_Rides.aspx:38
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9850746
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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