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 192:                    adp.Fill(ds);
Line 193:                    DataRowView r;
Line 194:                    r = ds.Tables[0].DefaultView[0];
Line 195:
Line 196:                    DataTable tb = (DataTable)(Session["ss"]);

Source File: g:\pleskvhosts\webstartechnologies.com\sangampublications.com\shoppingcart.aspx.cs    Line: 194

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +1901414
   System.Data.DataView.get_Item(Int32 recordIndex) +14
   user_Default.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\webstartechnologies.com\sangampublications.com\shoppingcart.aspx.cs:194
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   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.4700.0