the name 'controlname' does not exist in the current context
Posted
by zohair
on Stack Overflow
See other posts from Stack Overflow
or by zohair
Published on 2009-04-01T17:34:19Z
Indexed on
2010/05/19
5:10 UTC
Read the original article
Hit count: 322
Hi, I have a web application that I'm working on(ASP.NET2.0 with C#)[Using VS2005]. Everything was working fine, and all of a sudden I get the error:
Error 1 The name 'Label1' does not exist in the current context
and 43 others of the sort for each time that I used a control in my codebehind of the page.
This is only happening for 1 page. And it's as if the codebehind isn't recognizing the controls. Another interesting thing is that the intellisense isn't picking up any of the controls either..
I have tried to clean the solution file, delete the obj file, exclude the files from the project then re-add them, close VS and restart it, and even restart my computer, but none of these have worked.
Please Help. Thank you
© Stack Overflow or respective owner