Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Frequently i came accross a problem that is Page parse error....
to get out of this hell i used to remove inherit attribute in Page Directive.


After that it is showing compliation error???


How to solve it ???? what i have to do for the page compilation problem and page parser error tooo?????


And 1 more thing is i had written the code of a button1 click event k after after i had opened that project if i double click on that button i am going to inline coding.. How to solve it..Even though i took 1 button in that button events i doube clicked on a event still there is no use...I am redirecting to inline coding. How to solve the problem of that page. I should redirect to code behind file only
Posted

1 solution

I have run into this problem when using separate code files, so I will assume that this is how you are writing your pages.

The HTML page's @Page directive uses CodeFile to tell the compiler where the file is located, and Inherits to tell the compiler what to do with it once it has been found.

You will note that the code-behind file is a partial class that, by default, inherits from System.Web.UI.Page. The class name is the same one used in the HTML page's Inherits attribute. If you are changing the page's class to something other than the default, you need to change it in the code-behind; there should be no need to change Inherits.

I expect the problem with the button is related. If you get rid of Inherits, the compiler can no longer merge the "class" of the HTML page with the partial class of the code-behind. So, the compiler will assume that all code is inline on the HTML page and act accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900