I have a web site where any new aspx pages throws a “Parser Error”. It has existing pages, and I can change the html or the c# code in it, and the change will appear in the web page in the browser.
The error page gives a message of “Could not load type classname“. I’ve tried adding several different pages in Visual Studio, and copying the pages to IIS, so the syntax of the page should be fine.
I;ve also made sure that the “Inherits” attribute has the correct class and the class exists. I’m completely stuck.
Have a look at the Directive at the top of the page. Does it have a
CodeBehindattibute? If so change it toCodeFile, and try the page in the browser again.If that doesn’t work, compare the top part of a non-working page and a working page. Would be a little easier if you could post the top parts of the page here.