If you ever get an error like, it is an annoying situation where the web server is trying to use and old compilation of your aspx files.
The workaround I have is: rename web.config to stopweb.config.
Browse to the offending page URL it will return an error. After you receive the error rename stopweb.config to web.config
Browse to the offending page. This will force the server to compile the web pages.
And if it work the problem will now go away.