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 107:        //}
Line 108:        DataSet ds = obj.GetArticleByArticleID("Article", ID, Lang);
Line 109:        Page.Title += " - " + Convert.ToString(ds.Tables[0].Rows[0]["Title"]);
Line 110:        string str = Convert.ToString(ds.Tables[0].Rows[0]["Title"]);
Line 111:        //if (lblTitle.InnerText.Split(' ').Length > 0 && lblTitle.InnerText.Split(' ').Length < 15)

Source File: c:\inetpub\httpdocs\saigonxuavanay\nha-hang-xua-nay\ArticleDetail.aspx.cs    Line: 109

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
   am_thuc_ArticleDetail.WriteTitle() in c:\inetpub\httpdocs\saigonxuavanay\nha-hang-xua-nay\ArticleDetail.aspx.cs:109
   ASP.nha_hang_xua_nay_articledetail_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\httpdocs\saigonxuavanay\nha-hang-xua-nay\ArticleDetail.aspx:6
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   ASP.nha_hang_xua_nay_masterpage_master.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\httpdocs\saigonxuavanay\nha-hang-xua-nay\MasterPage.master:45
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   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