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 446:        if (lblTitle.InnerText.Split(' ').Length > 0 && lblTitle.InnerText.Split(' ').Length < 15)
Line 447:        {
Line 448:            str += " - " + dsCate.Tables[0].Rows[0]["CategoryName"].ToString();
Line 449:        }
Line 450:        Response.Write(str);

Source File: c:\inetpub\httpdocs\chuaphapvo\co-tu\ArticleDetail.aspx.cs    Line: 448

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2556141
   System.Data.RBTree`1.get_Item(Int32 index) +16
   System.Data.DataRowCollection.get_Item(Int32 index) +16
   ArticleDetail.WriteTitle() in c:\inetpub\httpdocs\chuaphapvo\co-tu\ArticleDetail.aspx.cs:448
   ASP.co_tu_articledetail_aspx.__RenderContent3(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\httpdocs\chuaphapvo\co-tu\ArticleDetail.aspx:7
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) +23
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +42
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


Version Information: Microsoft .NET Framework Version:2.0.50727.8762; ASP.NET Version:2.0.50727.8762