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 26:         DataView dv = vpif_imp.GetVipProductDetail(vpif);
Line 27:         int count = vpif_imp.UpdateClickCount(vpif);
Line 28:         Label1.Text = GetProductFirstTypeById(dv[0]["ProductFirstTypeId"].ToString());
Line 29:         rptCooperationDetail.DataSource = dv;
Line 30:         rptCooperationDetail.DataBind();

Source File: e:\YFWEB\yf115\VipProductDetail.aspx.cs    Line: 28

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +5315817
   System.Data.DataView.get_Item(Int32 recordIndex) +12
   VipProductDetail.Page_Load(Object sender, EventArgs e) in e:\YFWEB\yf115\VipProductDetail.aspx.cs:28
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


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