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 289:        Dim dt As New DataTable
Line 290:        Dim data = (From sec In db.Sections Where sec.isDeleted = False And sec.isActive = True And sec.sectionType = v Select sec).SingleOrDefault
Line 291:        SectionTitle = data.sectionTitle
Line 292:        SectionType = data.sectionType
Line 293:        SectionId = data.sectionId.ToString

Source File: E:\LIVE_SITES\ocpartnership.org\App_Code\CSection.vb    Line: 291

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   CSection.GetSectionBytype(String v) in E:\LIVE_SITES\ocpartnership.org\App_Code\CSection.vb:291
   Resources_IndustryExperts_Experts_List.BindData() in E:\LIVE_SITES\ocpartnership.org\resources\IndustryExperts\experts-list.aspx.vb:13
   Resources_IndustryExperts_Experts_List.Page_Load(Object sender, EventArgs e) in E:\LIVE_SITES\ocpartnership.org\resources\IndustryExperts\experts-list.aspx.vb:6
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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