Why are changes to the code displayed on the ASP.NET website, even if the code does not compile?

I am working on a rather large website project in Visual Studio 2010, and I wonder why the changes in the code are reflected when I test the web page individually (by right-clicking the .aspx file and choosing View Changes in Browser ), although in the code has errors that prevent it from compiling. It bothers me. I get some errors when running code in Visual Studio. However, any change I make, either in the code on the client side or on the server side, is reflected if I simply view the page in a browser. This makes sense for client-side code and markup, but why does it even accept "erroneous" server-side code? Does server side code need to be compiled? Thanks for any input. I still have many questions on this topic, but I hope that the answer to this question will help me answer my other questions.

EDIT: More info on the errors I get

I learned some more from the original developer assigned to this project. He informed me that for each additional function that he created in the project, he copied and pasted the source directory of the project and renamed this folder. For example, this is the source directory of the project:

App_Code [folder]

App_Data [folder]

Web.config [file]

...

He copied this every time he created a new β€œmodule” on the website. This, of course, is not the way I would have done it, but it has already been done now. Anyway, there are 4 copies of this source project directory, which means that there are 4 web.config files, 4 App_Code and App_Data folders (and 4 copies of classes in the App_Code folder). The errors I get are things like this: [server control] is not declared. It may be inaccessible due to its protection level [server control] is not declared. It may be inaccessible due to its protection level and [server control] is not a member of [partial class] , among several others that will undoubtedly warn intellisense if they were, in fact, errors. It seems that for some reason, the server controls on each of my web pages are not correctly associated with the corresponding code file. But intellisense does not highlight these errors or recognize them in any way. I get these errors when I try to build a project. I tried to expose the designer code file to try to fix these errors manually, but I found out that you cannot do this in the Website project. I honestly got confused.

If anyone knows how to fix this, let me know. If I can be more clear, tell me. I can't include any actual code, but I can try to give you some examples if that helps.

Here is another question similar to mine. Even the number of errors reported in Visual Studio is the same. it is not announced that it may be unavailable due to the level of protection

0
visual-studio-2010 web-site-project
source share
1 answer

It turns out that the original developer made copies of files with a partial class. They were scattered throughout the project, so I had no idea that they were there. After they were removed, everything worked as I expected.

0
source share

All Articles