Search code examples
asp.netvisual-studiovisual-studio-2008

Visual Studio thinks my controls are missing, but they're not. "The name xx does not exist in the current context"


When working with an ASP.NET application in Visual Studio 2008, my errors window often contains a list of errors such as;

The name 'txtUsername' does not exists in the current context.

When I double click on the error, it will go to the source, show the control underlined in red, then realise it's mistake and remove those errors. It's a real pain because if you have a genuine error, you have go and hunt for it.


Solution

  • Have you tried building the site?

    Build -> Build Web Site