Server Error in '/MetroFinance' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 60:                                     <div>
Line 61:                                         <asp:Label ID="lblNewsId" runat="server" Text='<%#Eval("NewsId").ToString()%>' Visible="false"></asp:Label>
Line 62:                                         <asp:HyperLink ID="lnkTitle" runat="server" NavigateUrl='<%# Me.Request.Path & "?SearchText=" & Me.txtSearch.Text & "&NewsId=" & Eval("NewsId").ToString() & "&page=" & Me.gvNews.PageIndex%>' CssClass='<%#iif(IndividualNewsList.DataKeys.Item(0).ToString = Eval("NewsId").ToString(), "newsliveon","") %>'>
Line 63:                                             <%# Eval("Title")%>
Line 64:                                         </asp:HyperLink>

Source File: C:\inetpub\wwwroot\MetroFinance\News\NewsLive.aspx    Line: 62

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.ArrayList.get_Item(Int32 index) +14282407
   ASP.news_newslive_aspx.__DataBinding__control8(Object sender, EventArgs e) in C:\inetpub\wwwroot\MetroFinance\News\NewsLive.aspx:62
   System.Web.UI.Control.OnDataBinding(EventArgs e) +100
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +178
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +247
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +5190
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +97
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +19
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +208
   News_NewsLive.BindData(String a_strSearchValue) +3299
   News_NewsLive.Page_Load(Object sender, EventArgs e) +3021
   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.4110.0