Server Error in '/trips' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 57:         Dim pDati As New Tab_TripAct
Line 58:         pDati = dati.leggiTrip(IDTrip)
Line 59:         Dim numero As Integer = pDati.TRI_Nposti
Line 60:         Dim prenotati As Integer = datiDett.contaPostiDettaglio(IDTrip)
Line 61:         numero = numero - prenotati

Source File: D:\webapps\Trips2014\InfoTrip.aspx.vb    Line: 59

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   InfoTrip.waitingListButton(Int64 IDTrip) in D:\webapps\Trips2014\InfoTrip.aspx.vb:59
   InfoTrip.InfoTrip_Load(Object sender, EventArgs e) in D:\webapps\Trips2014\InfoTrip.aspx.vb:14
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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