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 159:      pagestuff = SqlDataSource1.Select(argp) 
Line 160:      
Line 161:      therelatedlinks.contentID=pagestuff(0)("contentID")
Line 162:		therelatedlinks.pagenamemenu=pagestuff(0)("pagenamemenu")
Line 163:End Sub

Source File: D:\inetpub\mehaf\default.aspx    Line: 161

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +1801221
   System.Data.DataView.get_Item(Int32 recordIndex) +9
   ASP.default_aspx.Page_Load(Object Src, EventArgs E) in D:\inetpub\mehaf\default.aspx:161
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


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