views:

71

answers:

2

Putting code at aspx files is slower? The code is recompiled every access?

At my mind, code at aspx file is compiled at first access together their dll(maybe in Page_Init) and moved to Temp Asp.Net folder. And .aspx file just is necessary for IIS found a file.

+1  A: 

Where you put the code does not impact performance. At least in a codebehind file compared to the .aspx file.

marcc
+1  A: 

Having code in the aspx file or in the code-behind file makes no difference in terms of performance. Just in aesthetics.

However, compilation is a different thing, and it's actually related to deployment you choosing or the project that you created (Web Site or Web Application). Web Application is closer to the VS 2003 Web Project model and compiles all the source code during the build process and generates a single assembly.

Mircea Grelus
Web Application still have aspx files. And if you change any code at aspx, this is considered
Fujiy