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 55: </script>
Line 56: 
Line 57: <div class="<%# (subMainPage["imageVis1"].ToString() == "True") ? "page_section" : "page_section_no_img" %>">
Line 58: 
Line 59: <div class="page_image_up_container" style="background-image: url(<%# (subMainPage == null) ? "" : "images/" + subMainPage["image1"].ToString() %>); background-size: cover; background-repeat: no-repeat; background-position: center; display:<%# (subMainPage["imageVis1"].ToString() == "True") ? "table" : "none" %>;">

Source File: c:\inetpub\wwwroot\hamesameach.co.il\controls\hamesameach_pages.ascx    Line: 57

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.hamesameach_pages.__DataBind__control2(Object sender, EventArgs e) in c:\inetpub\wwwroot\hamesameach.co.il\controls\hamesameach_pages.ascx:57
   System.Web.UI.Control.OnDataBinding(EventArgs e) +97
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +173
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   pid.Page_LoadComplete(Object sender, EventArgs e) in c:\inetpub\wwwroot\hamesameach.co.il\pid.aspx.cs:41
   System.Web.UI.Page.OnLoadComplete(EventArgs e) +11859940
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5462


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