Server Error in '/' Application.

There is no row at position 0.

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: There is no row at position 0.

Source Error:


Line 166:        if (paper.OperationStatus != false)
Line 167:        {
Line 168:            Img_PaperLogo.ImageUrl = Convert.ToString(paper.NewsPaperTable.Rows[0]["PaperLogoPath"]);
Line 169:            string[] temp = paper.NewsPaperTable.Rows[0]["eLink"].ToString().Split('/');
Line 170:            if (temp[temp.Length - 1].IndexOf("http://") < 0)

Source File: C:\Inetpub\vhosts\adebooking.com\httpdocs\PackageByNewsPaper.aspx.cs    Line: 168

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +119
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   Default3.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\adebooking.com\httpdocs\PackageByNewsPaper.aspx.cs:168
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2857


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