Server Error in '/' Application.

There is no row at position 2.

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 2.

Source Error:


Line 53:         DataTable dtprogramadi = SqlProvider.DataTableGetir("select TOP(3) * from kariyerProgram order by programID DESC");
Line 54: 
Line 55:         DataTable dtaltmenu = SqlProvider.DataTableGetir("select * from kariyergaleriust where ustid='" + dtprogramadi.Rows[2]["programID"] + "' ORDER BY id ASC");
Line 56:         if (dtprogramadi.Rows.Count > 0)
Line 57:         {

Source File: e:\Web\gencliksporkariyer.ibb.gov.tr\galeri.aspx.cs    Line: 55

Stack Trace:


[IndexOutOfRangeException: There is no row at position 2.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +181
   System.Data.RBTree`1.get_Item(Int32 index) +16
   galeri.sonkariyer() in e:\Web\gencliksporkariyer.ibb.gov.tr\galeri.aspx.cs:55
   galeri.Page_Load(Object sender, EventArgs e) in e:\Web\gencliksporkariyer.ibb.gov.tr\galeri.aspx.cs:23
   System.Web.UI.Control.OnLoad(EventArgs e) +104
   System.Web.UI.Control.LoadRecursive() +112
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2164


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