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 70:             Dim data As System.Collections.IEnumerable = SqlDataSource1.Select(New DataSourceSelectArguments())
Line 71:             Dim dv As DataView = DirectCast(data, DataView)
Line 72:             Dim drv As DataRowView = dv(0)
Line 73: 
Line 74:             If dv.Count > 0 Then 'alleen als er een artikel is

Source File: C:\inetpub\wwwroot\insight\reinp\productdetails.aspx.vb    Line: 72

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +2157879
   System.Data.DataView.get_Item(Int32 recordIndex) +16
   F2P.GenerateDetails.Page_Init(Object Sender, EventArgs E) in C:\inetpub\wwwroot\insight\reinp\productdetails.aspx.vb:72
   System.Web.UI.Control.OnInit(EventArgs e) +106
   System.Web.UI.Page.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +166
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1598


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