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.
Another possible scenario is if the class name in the Page.aspx.vb file differs from the class name in the Page.aspx.designer.vb file. These need to be identical.