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 352:                }
Line 353:
Line 354:                if (ds.Tables["headInfo"].Rows[0]["pageTitle" + headLang] != DBNull.Value)
Line 355:                    if (ds.Tables["headInfo"].Rows[0]["pageTitle" + headLang].ToString() != "")
Line 356:                        Page.Title = ds.Tables["headInfo"].Rows[0]["pageTitle" + headLang].ToString();

Source File: d:\Web\homely-estate\App_Code\viewGui\code\GuiMenuBootstrap.cs    Line: 354

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +119
   System.Data.DataRowCollection.get_Item(Int32 index) +23
   real_estate.viewGui.code.GuiMenuBootstrap.getPageHeadInfo() in d:\Web\homely-estate\App_Code\viewGui\code\GuiMenuBootstrap.cs:354
   real_estate.viewGui.code.GuiMenuBootstrap.runMenuBootstrap(Boolean deleteLastLine) in d:\Web\homely-estate\App_Code\viewGui\code\GuiMenuBootstrap.cs:107
   real_estate.viewGui.viewGui_GuiMenuBootstrap.Page_Load(Object sender, EventArgs e) in d:\Web\homely-estate\viewGui\GuiMenuBootstrap.ascx.cs:33
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +117
   System.Web.UI.Control.LoadRecursive() +184
   System.Web.UI.Control.LoadRecursive() +184
   System.Web.UI.Control.LoadRecursive() +184
   System.Web.UI.Control.LoadRecursive() +184
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2854


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