Server Error in '/' Application.

The source contains no DataRows.

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.InvalidOperationException: The source contains no DataRows.

Source Error:


Line 59:         }
Line 60: 
Line 61:         dtFigli = dtFigli.AsEnumerable().Where(r => Convert.ToInt32(r.Field<string>("Valore")) >= dataCorrente).CopyToDataTable();
Line 62: 
Line 63:         string VariabilePaginazione = "Pagina";

Source File: c:\inetpub\vhosts\alpdesign.it\httpdocs\novita-in-programma.aspx.cs    Line: 61

Stack Trace:


[InvalidOperationException: The source contains no DataRows.]
   System.Data.DataTableExtensions.LoadTableFromEnumerable(IEnumerable`1 source, DataTable table, Nullable`1 options, FillErrorEventHandler errorHandler) +1095
   System.Data.DataTableExtensions.CopyToDataTable(IEnumerable`1 source) +96
   novita.Riempi() in c:\inetpub\vhosts\alpdesign.it\httpdocs\novita-in-programma.aspx.cs:61
   novita.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\alpdesign.it\httpdocs\novita-in-programma.aspx.cs:41
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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