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 24:         lblName.Text = Page.RouteData.Values["Title"].ToString();
Line 25:         dV = bank.searchData("select * from TblKnow where IdKnow='" + Page.RouteData.Values["Id"].ToString() + "' and LangKnow='1'", "TblKnow");
Line 26:         lblBody.Text = dV[0]["BodyKnow"].ToString();
Line 27:     }
Line 28: }

Source File: e:\inetpub\vhosts\gholhak-lab.com\httpdocs\Konws.aspx.cs    Line: 26

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +2209912
   System.Data.DataView.get_Item(Int32 recordIndex) +17
   Konws.Page_Load(Object sender, EventArgs e) in e:\inetpub\vhosts\gholhak-lab.com\httpdocs\Konws.aspx.cs:26
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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