Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the considerations for the new ASP.NET?

Shulou Source: shulou.com Published: 2022-06-02 07:59:12 10月01日 Update

This article mainly explains "what are the points for attention in the new ASP.NET". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the points for attention in the new ASP.NET?"

You may be used to using VS to create a new ASP.NET. VS takes care of almost all the trivial things for us, while masking a lot of important things. This article will show you how to use notepad to develop an ASP.NET page through a very simple example. Learning ASP.NET without using VS has two benefits:

1. All the code is under your control, giving you a better understanding of what you are doing.

two。 Using notepad development can give you a better understanding of how ASP.NET works.

ASP.NET compilation model

1. Dynamic compilation (Dynamic Compilation)

Dynamic compilation means that when you finish writing asp.net code and then deploy to IIS, when * user requests (Http Request) arrive, IIS will automatically compile the source code into IL,dll files for you, which are usually stored in C:\ Windows\ Microsoft.NET\ Framework\ v2.0.50727\ Temporary ASP.NET Files folder. To avoid going into too much detail, the examples in this article will use dynamic compilation (compilation independent of VS).

two。 Precompile (Pre-Compilation)

For precompilation, please see "Precompilation In ASP.NET 2.0" written by Scott Allen.

Running environment and authoring tools

1. Windows xp/2003/Vista/2008; IIS 5.1 Windows xp/2003/Vista/2008; IIS 6.0Accord 7.0; the examples of this article are written under Windows Server 2008 and run on IIS 7.0

2. .NET Framework 3.5

3. Notepad

Write code

1. Create a new folder ASPNETTest under disk c with the address C:\ ASPNETTe

two。 Create an aspx page file under the folder: test.aspx:

3. Create the text.cs file in the same directory:

Using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace Test {public partial class Test: Page {private void Page_Load (object sender, System.EventArgs e) {label.Text = "Hello ASP.NET!";}

Create a virtual directory (Virtual Directory) in IIS, and ASP.NET points the physical address to C:\ ASPNETTest and enter the address of the site in the browser, for example (the specific address of http://localhost/ASPNETTest/test.aspx) depends on the virtual directory you created.

At this point, I believe you have a deeper understanding of "what are the points for attention in the new ASP.NET?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Compile files addresses folders items notes code examples dynamic directories notepad learning things content websites pages development running practical deeper Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple macOS Shulou Tech Info OPPO Reno Xiaomi