• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

Website Asp.NET compile process

Note: I am writing s website in C# (Csharp)

If you have all your .aspx files and .aspx.cs files in one folder on your production web server, am I right by saying all the .aspx files in that folder get compiled into one dll and all the .aspx.cs files get compiled into another dll?

So if you have 2 folders that make up the website with .aspx and .aspx.cs files, the aspnet compiler creates a dll for the .aspx files and a dll for the .aspx.cs files for each folder?
So probably in this case you have 4 dlls making up the Website. Of course that excludes the APP_Code folder code.
1 Solution
Jacques Bourgeois (James Burger)PresidentCommented:
A .dll contains compiled code. .aspx files do not contain compiled code, they contain html mixed with script code. So they are not compiled into .dll.

The .aspx files are kept as they are, as individual files. This is what is actually loaded when the user calls a page. They are the equivalent of .html files, except that they will call code in an asp dll.

The aspx.cs files contain the actual code. These are compiled into a .dll.

Look at the resulting web site after deployment, and you will see that the .aspx files are still there, while the aspx.cs files have been compiled in (usually) only one dll.
metro156Author Commented:
I am talking Website not Web application.

However, I do believe whether it's a web application or Website, the .aspx files are eventually compiled so they can work with .apsx.cs ( code behind files).

I know ASP Classic is interpreted but ASP.NET Web pages are compiled.

I'll get back to you with more information so we can continue our discussion. Sorry it is late here.

Please see these weblinks about Website and WebApplications  - the default compile and the precompile.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now