Hello Friends,
When I load my ASP.Net 2008 project, I often get errors in the VB code behind file such as the one posted above. Sometimes, it sales a textbox object or label is not defined, even if it is and as I result I cannot load my project. My code looks like this one:
On Error GoTo Err_Page_Load Dim strMsg As String If Session( " GLSys" ) = True Then mnuMainMenu.Items( 1 ).Enabled = True End If lblUserName.Text = Session( " UserName" ) lblPeriodNumb.Text = Session( " PeriodNumb" ) strMsg = CStr (session( " StartDate" )) & " -" & CStr (session( " EndDate" )) ' lblDateRange.Text = Session("StarDate").ToString ' lblDateRange.Text = lblDateRange.Text & "-" & Session("EndDate").ToString lblDateRange.Text = strMsg lblAcctYear.Text = Session( " CurrYear" ).ToString & " -" & Session( " NextYear" ).ToString lblLocCurrCode.Text = Session( " LocCurrCode" ) lblDateClock.Text = DateTime.Today.ToString lblCoyName.Text = Session( " CoyName" ) ' & "->" & Session("BranchCode") imgCoyLogo.ImageUrl = " ~/Images/CoyLogo.jpg" Exit_Page_Load: Exit Sub Err_Page_Load: lblStatus.Text = lblStatus.Text & " Error No : " & Err.Number.ToString & " ->" & Err.Description & " has occurred!" & Chr( 13 ) lblStatus.Visible = True Resume Next
Could someone please help! How can I solve this problem and why do I get these types of messages.
Thanks to all!
Sylvester
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •