I am quite new to .NET development and I am just wondering how does it work?
My undermentioned points are:
- While developing ASP.NET application, under the project we have files like:
- pagename.aspx
- pagename.aspx.cs
- pagename.asp.desiger.cs
- After adding certain functionality to
pagename.aspxpage, assuming I have the development required web application (this is not my concern, what is developed) - Now I’m going to deploy this application, I use web deployment MSI which creates the required files in the one folder called
folderdelopyed. - This folder contains the files required to support this application but interesting does not contain
pagename.aspx.csandpagename.aspx.designer.csfiles.
My question is if folderdelopyed does not contain .cs file, then how does it work to run the segment of code which I have written in this file called PageName.aspx.cs?
The code in your cs files gets compiled into a dll.
For Web Application projects this is one dll
For Web Site projects, this is a dll per page.
All of the code is now in the dll’s in the bin folder of the website.
You can use a tool like ILSpy (http://wiki.sharpdevelop.net/ILSpy.ashx) to look inside the dll’s and see your code.
In the old days, for classic ASP, the script used to be embedded in your page – a mix of code and HTML, and was interpreted at runtime.
I like the new way more 🙂