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 43:         List<string> styles = new List<string>();
Line 44: 
Line 45:         if (_gallery.Typ == 2) {
Line 46:             styles.Add("~/content/ekko-lightbox.min.css");
Line 47:         }

Source File: e:\kunden\homepages\9\d760990498\www\www\naturfreunde-pucking\ContentModules\Gallery.ascx    Line: 45

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.contentmodules_gallery_ascx.GetStylesheetReferences() in e:\kunden\homepages\9\d760990498\www\www\naturfreunde-pucking\ContentModules\Gallery.ascx:45
   develtop.WebManager.Default.HandleModes(String module) in d:\workdev\WebManager3\Default.aspx.cs:97
   develtop.WebManager.Default.Page_Init(Object sender, EventArgs e) in d:\workdev\WebManager3\Default.aspx.cs:79
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnInit(EventArgs e) +97
   System.Web.UI.Page.OnInit(EventArgs e) +14
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +416


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