Errore server nell'applicazione '/'.

Nessuna riga alla posizione 0.

Descrizione: Eccezione non gestita durante l'esecuzione della richiesta Web corrente. Per ulteriori informazioni sull'errore e sul suo punto di origine nel codice, vedere la traccia dello stack.

Dettagli eccezione: System.IndexOutOfRangeException: Nessuna riga alla posizione 0.

Errore nel codice sorgente:


Riga 22:         string sqlUff = $"select ufficio,ID from UFFICI where id ={Request.QueryString["idufficio"].ToString()} ";
Riga 23:         DataTable dtNomeuff = Sistema.Database.EseguiQuery(sqlUff);
Riga 24:         string struff = dtNomeuff.Rows[0]["Ufficio"].ToString();
Riga 25:         nome_ufficio.InnerHtml = Utility.FirstCharToUpper(dtNomeuff.Rows[0]["Ufficio"].ToString());
Riga 26:         main_titolo.InnerHtml += $@" - {dtNomeuff.Rows[0]["Ufficio"].ToString()}";

File di origine: C:\website\comunecherasco\ita\servizi\modulistica.aspx.cs    Riga: 24

Traccia dello stack:


[IndexOutOfRangeException: Nessuna riga alla posizione 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +125
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   ita_modulistica.Load_Faq() in C:\website\comunecherasco\ita\servizi\modulistica.aspx.cs:24
   ita_modulistica.Page_Load(Object sender, EventArgs e) in C:\website\comunecherasco\ita\servizi\modulistica.aspx.cs:14
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


Informazioni di versione: Versione di Microsoft .NET Framework:4.0.30319; Versione di ASP.NET:4.8.4700.0