I recently converted a website project to a web application project in Visual Studio 2008. I finally got it to compile, and the first page (the login screen) displayed as n
I had copied and renamed the page (aspx/cs). The page name was "mainpage" so the class name at the top of the cs file as follows:
After renaming the class to match this error was resolved.