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.
Ok, I have this resolved now. It was becuase I had renamed a copy of the .aspx file and which still using the newer versions code behind file.
The code behind file was looking for txtName.text but on the older version of the .aspx file txtName didnt exist!
I have excluded the older version of the page from the project and it appears to run ok now.
Thanks everyone for you help.