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 216:                dt = FilterDataTable(dt, "idEvento = " & idEvento)
Line 217:
Line 218:                ViewState("proxDataCheck") = CDate(dt.Rows(0)("dataEvento"))
Line 219:                ViewState("proxData") = write("{1} {2}", CDate(dt.Rows(0)("dataEvento")).ToString("dddd <b>dd MMMM</b> yyyy"), isNULL(dt.Rows(0)("orarioEvento"), "", " - ore {1}"))
Line 220:                ViewState("proxlinkAcquisto") = isNULL(dt.Rows(0)("linkAcquisto"), "")

Source File: C:\inetpub\wwwroot\www.teatroverdimontecatini.it.RESTYLING\scheda.aspx.vb    Line: 218

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2133215
   System.Data.DataRowCollection.get_Item(Int32 index) +21
   schedaAspx.popolaDate() in C:\inetpub\wwwroot\www.teatroverdimontecatini.it.RESTYLING\scheda.aspx.vb:218
   schedaAspx.Page_Init(Object sender, EventArgs e) in C:\inetpub\wwwroot\www.teatroverdimontecatini.it.RESTYLING\scheda.aspx.vb:17
   System.Web.UI.Control.OnInit(EventArgs e) +95
   System.Web.UI.Page.OnInit(EventArgs e) +13
   System.Web.UI.Control.InitRecursive(Control namingContainer) +139
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408


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