Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How asp.net application works?

Tags:

asp.net

iis

I am quite new to .NET development and I am just wondering how does it work?

My undermentioned points are:

  1. While developing ASP.NET application, under the project we have files like:
    • pagename.aspx
    • pagename.aspx.cs
    • pagename.asp.desiger.cs
  2. After adding certain functionality to pagename.aspx page, assuming I have the development required web application (this is not my concern, what is developed)
  3. Now I'm going to deploy this application, I use web deployment MSI which creates the required files in the one folder called folderdelopyed.
  4. This folder contains the files required to support this application but interesting does not contain pagename.aspx.cs and pagename.aspx.designer.cs files.

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?

like image 426
AnandMohanAwasthi Avatar asked Feb 22 '23 06:02

AnandMohanAwasthi


1 Answers

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 :-)

like image 84
dash Avatar answered Mar 04 '23 13:03

dash