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 17:         string st_id1 = Request.QueryString["eid"].ToString();
Line 18:         DataTable dt_eventdetails = SqlHelper.ExecuteDataTable(Connection.My_Connection(), CommandType.Text, "select tbl_past_event.event_id, tbl_past_event.department_show, tbl_past_event.event_page, tbl_past_event.event_name, FORMAT(tbl_past_event.event_date,'dd-MM-yyyy') as event_date, tbl_past_event.event_pic, tbl_past_event.event_description from tbl_past_event where event_id=" + st_id1 + " order  by event_id");
Line 19:         string page_name = dt_eventdetails.Rows[0]["event_name"].ToString();
Line 20:         this.Title = page_name + " - Govt. Chandulal Chandrakar Arts & Science College, Patan";
Line 21:     

Source File: c:\inetpub\vhosts\govtcccollegepatan.in\httpdocs\events_details.aspx.cs    Line: 19

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2136731
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   events_details.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\govtcccollegepatan.in\httpdocs\events_details.aspx.cs:19
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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