Recently we deployed two wsp solutions in an environment. One wsp consists of master page and the other one consists of a site page with code behind where I use events like onclick and all.
After the deployment when I try to access the aspx page we got the above error.
Remove the code behind file and create a web part and add the web part in the page.You can see my blog post on how to create site page without code behind.
Go to Site Settings page, under the Site Action section, click Reset to site definition.
Then give your page url and click Reset.
Check your page.
If its still the same give your master page url (which ends with .master) and repeat the above step.
Now your page should work fine.