Server Error in '/' 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 108:            GridView1.DataBind()
Line 109:        End If
Line 110:        drpListTidspunkt = CDate(DropDownList1.SelectedItem.Value).ToString("yyyy-MM-dd HH:mm:ss")
Line 111:        SqlDataSource2.SelectCommand = "SELECT [Id],[Tidspunkt],[VisesNavn] FROM [Tilmeldinger" & ProjektNavn & "] WHERE [Venteliste]=0 AND [Tidspunkt] ='" & drpListTidspunkt & "'  ORDER BY CASE WHEN [TilmeldtTidspunkt] IS NULL THEN 1 ELSE 0 END, [TilmeldtTidspunkt];"   ' "SELECT DISTINCT [Tidspunkt] FROM [FoedselsdagsBookinger] WHERE [BestillersForkNavn]='Stadig LEDIG' AND [BookingTidspunkt] > #" & CDate(Label16.Text).ToString("MM/dd/yyyy") & " 00:00:00# AND [BookingTidspunkt] < #" & CDate(Label16.Text).ToString("MM/dd/yyyy") & " 23:59:59#  ORDER BY [BookingTidspunkt];"
Line 112:        SqlDataSource3.SelectCommand = "SELECT [Id],[Tidspunkt],[VisesNavn] FROM [Tilmeldinger" & ProjektNavn & "] WHERE [Venteliste]=1 AND [Tidspunkt] ='" & drpListTidspunkt & "'  ORDER BY CASE WHEN [TilmeldtTidspunkt] IS NULL THEN 1 ELSE 0 END, [TilmeldtTidspunkt];"   ' "SELECT DISTINCT [Tidspunkt] FROM [FoedselsdagsBookinger] WHERE [BestillersForkNavn]='Stadig LEDIG' AND [BookingTidspunkt] > #" & CDate(Label16.Text).ToString("MM/dd/yyyy") & " 00:00:00# AND [BookingTidspunkt] < #" & CDate(Label16.Text).ToString("MM/dd/yyyy") & " 23:59:59#  ORDER BY [BookingTidspunkt];"

Source File: D:\WEB\svoemmeland.net\www\tilmeldingVandgym\SletVandgym.aspx.vb    Line: 110

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   _Default.Page_Load(Object sender, EventArgs e) in D:\WEB\svoemmeland.net\www\tilmeldingVandgym\SletVandgym.aspx.vb:110
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2849


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