'txtName' is not declared. It may be inaccessible due to its protection level

后端 未结 13 1580
暖寄归人
暖寄归人 2020-12-15 19:22

After putting a textbox on my page when I compile it I get the above error:

\'txtName\' is not declared. It may be inaccessible due to its protection level.

相关标签:
13条回答
  • 2020-12-15 20:12

    I had the same problem when I changed my asp.net website from 3.5 to 4.0.

    To solve the problem I recreated the entire website in 4.0 page by page, making sure all pages have the same names. I copied page contents for each page leaving out the top line that starts with <%@ from the 3.5 website to the 4.0 website.

    I copied all the code in the page class in the code behind for for each page from the 3.5 to the 4.0 website.

    0 讨论(0)
提交回复
热议问题