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.
May be this is missing in the textbox declaration:
runat="server"