Server Error in '/' Application.

Index 0 is either negative or above rows count.

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: Index 0 is either negative or above rows count.

Source Error:


Line 55:         SqlPageData.SelectCommand = "Select * from PagesTree where PageId=" & MasterId
Line 56:         dv = CType(SqlPageData.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
Line 57:         drv = dv(0)
Line 58:         MareMakomStr = MareMakomStr & "<li itemprop=""itemListElement"" itemscope itemtype=""http://schema.org/ListItem""><a itemprop=""item"" href=""page.aspx?cat=" & Request.QueryString("cat") & """><span itemprop=""name"">" & drv("Raba") & "</span></a><meta itemprop=""position"" content=""2"" /></li>"
Line 59:         MareMakomStr = MareMakomStr & "<li itemprop=""itemListElement"" itemscope itemtype=""http://schema.org/ListItem""><a itemprop=""item"" href=""page.aspx?cat=" & Request.QueryString("cat") & "&amp;cat-sub=" & Request.QueryString("cat-sub") & """><span itemprop=""name"">" & drv("AbaName") & "</span></a><meta itemprop=""position"" content=""3"" /></li>"

Source File: D:\spaces\zeuspa.co.il\zeuspa.co.il\wwwroot\page.aspx    Line: 57

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +4880739
   System.Data.DataView.get_Item(Int32 recordIndex) +12
   ASP.page_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\spaces\zeuspa.co.il\zeuspa.co.il\wwwroot\page.aspx:57
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Version Information: Microsoft .NET Framework Version:2.0.50727.8966; ASP.NET Version:2.0.50727.8962