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 34:             DataView dv_main = DBAccess.GetListView(search);
Line 35: 
Line 36:             pdf_name = dv_main[0]["pdf"].ToString();
Line 37: 
Line 38:             rpt_news.DataSource = dv_main;

Source File: c:\inetpub\wwwroot\CBRE_Projects\langston\News\details.aspx.cs    Line: 36

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +2209912
   System.Data.DataView.get_Item(Int32 recordIndex) +17
   news_details.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\CBRE_Projects\langston\News\details.aspx.cs:36
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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