Is the code compiled in an aspx page in a web application?

Let me start by saying that if anyone knows of a good article that talks about this subject, please point me to it.

Is the code on the .aspx page (between the <%%> tags) in the web application compiled or processed as markup, where you can simply change it without recompiling the solution? Does the compiler compile only in .cs and designer.cs files?

+4
source share
2 answers

If you are developing a Web Application project (as opposed to a Web site), any change to the class (.cs), code file (.aspx.cs), designer files, etc. (basically nothing that is markup or static files like .htm) will require rebuilding in Visual Studio.

+4
source

All code in the .aspx file will .aspx to or from code blocks ( <%%> ).

Modifying the .aspx file will recompile IIS on the next request.

See MSDN - Dynamic Compilation of ASP.NET .


Update (next comment):

As for the development work, pretty much the same thing happens when you use the dev web server to view the page. You do not need to recompile the solution / project, but the page will be recompiled dynamically.

+2
source

Source: https://habr.com/ru/post/1335882/


All Articles