[ASP. NET Notes] 2. Overview of ASP. NET

Source: Internet
Author: User
1: Development History of Asp.net
2: How Asp.net works
3: Create an Asp.net Runtime Environment
4: write the first Asp.net ApplicationProgram
5: file structure of Asp.net
6. How to port an Asp.net Application
7. How to publish an Asp.net Application
8: Asp.net Programming

Development History of Asp.net

ASP has been around for more than 10 years since its birth in 1996 and now in Asp.net. In this short decade, Asp has undergone dramatic changes.

Asp1.0 ----------- 1996

ASP 2.0 ----------- 1998
Asp3.0 ----------- 2000
Asp.net ----------- 2001

How Asp.net works
1: the client sends an HTTP request to the Web server through IE to access a web page
2: The Web server analyzes HTTP requests from the client to locate the webpage.
3: The Web server finds the corresponding webpage and processes the programs in the webpage. Code And finally generate pure HTML code
4: Finally, return the pure HTML to the IE of the client for execution, and the displayed result will be displayed.
5: it can be seen that the Asp.net program is executed on the server side, but the execution result (pure HTML code) is returned to the client.

Create an Asp.net Runtime Environment
1. Install IIS (Internet Information Server)
1): You can install IIS (add and delete a program ---> component) through the windows installation disc to explain how to view IIS
2): Start IIS. To run the code on the Web server, you must start IIS. However, after you install IIS, Windows will automatically start IIS at every startup, try to stop (default web site, single right --> stop)
3): to test whether IIS works normally, enter [http: // localhost/iisstart. asp]. iisstart. asp is specially used to test the ISS for users.
4): Set the virtual directory:
When developing a web project, we can put all the web pages in a project under the same directory, so that even in management, it is convenient for customers to access the Web page, however, it is too difficult to directly use a directory to access the project. Therefore, it is a virtual directory that actually points to the actual directory of the project. This directory is a virtual directory.
5): but because we pass. net to develop a project ,. net will automatically create a virtual directory, but when you take the web page project for demonstration, you must create a virtual directory (because your web project is not compiled in the demo computer)
2: Install MDAC. MDAC (Microsoft Data Access Components) is a tool used for Asp.net to exchange data with the database. It can be found or downloaded from the Windows2000 disc.
3): Install the Net Framework Package. Find it from the. net cd.
To sum up:
1: To install Asp.net, three components are required. However, if visual studio.net is installed on the implementation, the installation of two or three components is automatically installed.
2: installation steps: first install IIS (remember) and then install visual studio.net.


compile the first Asp.net application
1: [response. write ("string") to the IE output string of the client]
2: After saving, you can see that the extension is *. aspx
3: F5 run

the file structure of Asp.net [use C #. Net for Asp.net development, which is different from other languages]
An Asp.net file consists of the following types of files. They are:
*. aspx: webpage files. A project can contain multiple webpage files because a website contains multiple pages
*. aspx. CS: code file corresponding to the webpage
Of course there are some other ancillary files
webconfig file: application configuration file (important ), you can set a parameter for the application.

How to port an Asp.net Program
1: copy the *. aspx and *. aspx. CS files to the other computer.
3: create a virtual directory
4: directly start vs.net 2005 to open the website


How to publish an Asp.net Program
First, you must know that only files with the extension *. aspx and *. aspx. CS are required for publishing, so other files do not need to be published.
1: copy the *. aspx and *. aspx. CS files of the website to the target computer.
2: create a virtual directory with the name available.
3: Open IE and enter the following format in the address bar:
Http: // ip address of the computer where the webpage is located/Name of the created virtual directory/Name of the webpage
4: Special: if the web server and web page are on the same computer, the form can be as follows:
Http: // The virtual directory name/Webpage name created by localhost or 127.0.0.1/. The http: can be omitted, that is
Localhost or 127.0.0.1/virtual directory name/Web Page name created
5: If dotnetframework is not installed on the target computer, install dotnetframework and SQL Server first.

 

Asp.net Programming Method
There are two programming Modes
A) codebeside: softens the display part of the page with the code. It is the previous ASP programming mode.
B) codebehind (post code): separates the display part of the page from the code part in *. aspx. CS mode.
C) Note: The HTML tag of the page and C #. Net code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.