Ошибка vb.net: недоступна из-за уровня защиты

Я впервые работаю с кодом vb.net, но у меня есть 5-летний опыт работы с C #. От предыдущего разработчика мне сказали, что код на сервере работает нормально без каких-либо ошибок, но как только я открыл папку веб-сайта (веб-сайт не 'у меня нет файла решения), я попытался создать сайт и получил множество ошибок, говорящих:

labelControl» не объявлено Может быть недоступен из-за уровня защиты.

Тот'Это происходит для всех элементов управления на двух страницах, которые я открыл до сих пор. Честно говоря, я боюсь открывать больше страниц :).

Вот части разметки, логики и кода дизайнера для одного из файлов:

Разметка:


       
    

                                     
         
                  <br>Cost per door jamb replacement
                  
                  
                  
                  $
         

         
                  <br>Cost per exterior door replacement
                  
                  
                  
                  $
         

         
                  <br>Cost to replace one single garage door
                  
                  
                  
                  $
         

         
                  <br>Cost to replace one double garage door
                  
                  
                  
                  $
         


         
                  <br>Cost per interior door replacement
                  
                  
                  
                  $
         

         
                  <br>Cost to replace one patio door
                  
                  
                  
                  $
         

         
                  <br>Cost per patio glass replacement
                  
                  
                  
                  $
         



                         
                  <br>Cost to replace one dishwasher
                  
                  
                  
                  $
                          
                

Логика:

Imports Homevesters

Public Class Overried_Calc_Values
    Inherits System.Web.UI.Page

    Dim clsValueOrganization As New clsCalcValues
    Dim clsValueDefaults As New clsCalcValues


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If IsUserLoggedIn(Me) = False Then
            Response.Redirect("~/Account/Login.aspx")
            Exit Sub
        End If

        If IsPostBack = False Then

            clsValueOrganization.Load("", False, Session("OrgID"))

            clsValueDefaults.Load("", False, "DEFAULT")

            ' c is dollar format with dollar symbol
            lblDoorJam.Text = clsValueDefaults.dDoorJamb.ToString("c")
            lblExtDoor.Text = clsValueDefaults.dExtDoor.ToString("c")
            lblGarageSingle.Text = clsValueDefaults.dGarageDoorSgl.ToString("c")
            lblGarageDouble.Text = clsValueDefaults.dGarageDoorDbl.ToString("c")
            lblInteriorDoor.Text = clsValueDefaults.dIntDoor.ToString("c")
            lblPatioDoor.Text = clsValueDefaults.dPatioDoor.ToString("c")
            lblPatioGlass.Text = clsValueDefaults.dPatioGlass.ToString("c")
            lblDishWasher.Text = clsValueDefaults.dDishwasher.ToString("c")
            lblFans.Text = clsValueDefaults.dFans.ToString("c")
            lblLightFixtures.Text = clsValueDefaults.dLightFixture.ToString("c")
            lblServicePanel.Text = clsValueDefaults.dServicePanel.ToString("c")
            lblRange.Text = clsValueDefaults.dRange.ToString("c")
            lblRefrigerator.Text = clsValueDefaults.dRefrigerator.ToString("c")
            lblStoveTop.Text = clsValueDefaults.dStoveTop.ToString("c")
            lblVentHood.Text = clsValueDefaults.dVentHoods.ToString("c")
            lblElectricalWiring.Text = clsValueDefaults.dWiringReplace.ToString("c")
            lblFloorCovering.Text = clsValueDefaults.dFloorCover.ToString("c")
            lblTileFloor.Text = clsValueDefaults.dTileFloor.ToString("c")
            lblOldHouse4150.Text = clsValueDefaults.dOldHouse1.ToString("c")
            lblOldHouse2140.Text = clsValueDefaults.dOldHouse2.ToString("c")
            lblOldHouse0020.Text = clsValueDefaults.dOldHouse3.ToString("c")
            lblOldHouse1900.Text = clsValueDefaults.dOldHouse4.ToString("c")

            ckMedWood.Checked = Not (clsValueOrganization.dMdWoodWindow = clsValueDefaults.dMdWoodWindow)
            ckSmallMet.Checked = Not (clsValueOrganization.dSmMetalWindow = clsValueDefaults.dSmMetalWindow)
            ckSmallPane.Checked = Not (clsValueOrganization.dSmGlassPanes = clsValueDefaults.dSmGlassPanes)
            ckSmallWood.Checked = Not (clsValueOrganization.dSmWoodWindow = clsValueDefaults.dSmWoodWindow)



        End If



    End Sub



End Class

Дизайнер:

'------------------------------------------------------------------------------
' 
'     This code was generated by a tool.
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated. 
' 
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On


Partial Public Class Override_Calc_Values

    '''
    '''lblDoorJam1 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblDoorJam1 As Global.System.Web.UI.WebControls.Label

    '''
    '''lblFactorType1 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblFactorType1 As Global.System.Web.UI.WebControls.Label

    '''
    '''lblDoorJam control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblDoorJam As Global.System.Web.UI.WebControls.Label

    '''
    '''ckDoorJam control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents ckDoorJam As Global.System.Web.UI.WebControls.CheckBox

    '''
    '''txtDoorJam control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents txtDoorJam As Global.System.Web.UI.WebControls.TextBox

    '''
    '''lblExtDoor1 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblExtDoor1 As Global.System.Web.UI.WebControls.Label

    '''
    '''lblFactorType2 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblFactorType2 As Global.System.Web.UI.WebControls.Label

    '''
    '''lblExtDoor control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblExtDoor As Global.System.Web.UI.WebControls.Label

    '''
    '''ckExtDoor control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents ckExtDoor As Global.System.Web.UI.WebControls.CheckBox

    '''
    '''txtExtDoor control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents txtExtDoor As Global.System.Web.UI.WebControls.TextBox

    '''
    '''lblGarageSingle1 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblGarageSingle1 As Global.System.Web.UI.WebControls.Label

    '''
    '''lblFactorType3 control.
    '''
    '''
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''
    Protected WithEvents lblFactorType3 As Global.System.Web.UI.WebControls.Label

End Class

Вот некоторые из ошибок, которые я получаю:

Пожалуйста, дайте мне знать, что вы думаете, может быть причиной. Я с нетерпением жду, чтобы услышать от вас скоро. Спасибо, лазиале

Ответы на вопрос(1)

Ваш ответ на вопрос