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 26: 		SqlDataSource.SelectCommand = "SELECT PrincipalName, WebURL, WebSubject, WebDetail FROM PrincipalWebSiteListing WHERE (PrincipalID = '" + PrincipalID + "')";
Line 27:         System.Data.DataView principalInfo = (System.Data.DataView)SqlDataSource.Select(new DataSourceSelectArguments());
Line 28: 		PrincipalName = principalInfo[0]["PrincipalName"].ToString();
Line 29: 		PrincipalTitle = principalInfo[0]["WebSubject"].ToString();
Line 30: 		PrincipalDescription = principalInfo[0]["WebDetail"].ToString();

Source File: c:\inetpub\www.flwse.com\Principal.aspx    Line: 28

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +4880755
   System.Data.DataView.get_Item(Int32 recordIndex) +12
   ASP.principal_aspx.Page_Load(Object sender, EventArgs e) in c:\inetpub\www.flwse.com\Principal.aspx:28
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062