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 19:     Public WriteOnly Property Selected() As MENU
Line 20:         Set(value As MENU)
Line 21:             CType(FindControl("hlmenu" + CInt(value).ToString), HtmlAnchor).Attributes("class") += " selected"
Line 22:         End Set
Line 23: 

Source File: C:\Inetpub\vhosts\summit-group.co.uk\httpdocs\controls\ucmenu.ascx.vb    Line: 21

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   controls_ucmenu.set_Selected(MENU value) in C:\Inetpub\vhosts\summit-group.co.uk\httpdocs\controls\ucmenu.ascx.vb:21
   ASP.case_studies_aspx.__BuildControlucmenucontrol() in C:\Inetpub\vhosts\summit-group.co.uk\httpdocs\case_studies.aspx:42
   ASP.case_studies_aspx.__BuildControlTree(case_studies_aspx __ctrl) in C:\Inetpub\vhosts\summit-group.co.uk\httpdocs\case_studies.aspx:1
   ASP.case_studies_aspx.FrameworkInitialize() in C:\Inetpub\vhosts\summit-group.co.uk\httpdocs\case_studies.aspx.vb:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +51
   System.Web.UI.Page.ProcessRequest() +74
   System.Web.UI.Page.ProcessRequest(HttpContext context) +69
   ASP.case_studies_aspx.ProcessRequest(HttpContext context) +45
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +789
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +194
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87


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