“/”应用程序中的服务器错误。

在位置 0 处没有任何行。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IndexOutOfRangeException: 在位置 0 处没有任何行。

源错误:


行 38:                             <h3 class="fs18 c-666"><a href="NewsDetail---<%#Eval("Id")%>.htm"  target="_blank"><%#Eval("Title")%></a></h3>
行 39:                             <div class="mb10"><span class="fs12 c-999"><%#string.Format("{0:yyyy/MM/dd}",Eval("PostTime"))%></span></div>
行 40:                             <div class="mb10"><%#GetAuthorOrCompany(Convert.ToInt32(Eval("AuthorId")),Convert.ToInt32(Eval("Cid")),Convert.ToInt32(Eval("Id")))%></div>
行 41:                             <p class="c-666"><%#StringCode.GetLeftSubString(Eval("ShortContent").ToString(),160,true)%></p>
行 42:                             <div class="news-topic-tag fs16 mt10"><%#GetNewsLinkTopics(Convert.ToInt32(Eval("IfTopic")),Convert.ToInt32(Eval("Id")))%></div>

源文件: d:\web\StanleyTech.Agropage.ApNewsCn\News\List.aspx    行: 40

堆栈跟踪:


[IndexOutOfRangeException: 在位置 0 处没有任何行。]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +119
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   StanleyTech.Agropage.BLL.CnNewsDataRevisionBLL.GetAuthorOrCompany(Int32 AuthorId, Int32 Cid, Int32 NewsId) in D:\project\StanleyTechNew\StanleyTech_Core\StanleyTech.Agropage.BLL\资讯\CnNewsDataRevisionBLL.cs:218
   StanleyTech.Agropage.ApNewsCn.News.List.GetAuthorOrCompany(Int32 AuthorId, Int32 Cid, Int32 NewsId) in D:\project\StanleyTechNew\StanleyTech_ApCn\StanleyTech.Agropage.ApNewsCn\News\List.aspx.cs:93
   ASP.news_list_aspx.__DataBind__control3(Object sender, EventArgs e) in d:\web\StanleyTech.Agropage.ApNewsCn\News\List.aspx:40
   System.Web.UI.Control.OnDataBinding(EventArgs e) +74
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +148
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +181
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +158
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +126
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +447
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +62
   System.Web.UI.WebControls.Repeater.DataBind() +126
   StanleyTech.Agropage.ApNewsCn.News.List.Page_Load(Object sender, EventArgs e) in D:\project\StanleyTechNew\StanleyTech_ApCn\StanleyTech.Agropage.ApNewsCn\News\List.aspx.cs:69
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +74
   StanleyTech.Agropage.BLL.CommonBasePage.OnLoad(EventArgs e) in D:\project\StanleyTechNew\StanleyTech_Core\StanleyTech.Agropage.BLL\BasePage\CommonBasePage.cs:36
   StanleyTech.Agropage.ApNewsCn.ApNewsCnBasePage.OnLoad(EventArgs e) in D:\project\StanleyTechNew\StanleyTech_ApCn\StanleyTech.Agropage.ApNewsCn\App_Code\ApNewsCnBasePage.cs:21
   System.Web.UI.Control.LoadRecursive() +120
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2819


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34237