Server Error in '/' Application.

Index 0 is either negative or above rows count.

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.IndexOutOfRangeException: Index 0 is either negative or above rows count.

Source Error:


Line 119:            End Try
Line 120:
Line 121:            chtm += "<a href=""" & htmlink & """ class=""item " & myDataView2(i)("cattxt") & """>" & vbNewLine
Line 122:            chtm += "<div class=""info"">" & myDataView2(i)("TITLE") & "<div class=""views"">" & FormatNumber(myDataView2(i)("viewed"), 0) & "</div><span class=""type""></span></div>" & vbNewLine
Line 123:            chtm += "<img src=""" & myDataView2(i)("thumb") & """ alt=""""></a>" & vbNewLine

Source File: D:\sites\dailyhaha-2015\toprated\year\default.aspx    Line: 121

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +2209880
   System.Data.DataView.get_Item(Int32 recordIndex) +17
   ASP.toprated_year_default_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\sites\dailyhaha-2015\toprated\year\default.aspx:121
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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