ASP Web pages in the. NET Framework Environment (1) (Wangguorong)

Source: Internet
Author: User
Tags comparison data structures iis

Internet company crew, website shutdown, the end of the electronic newspaper ..., after the low ebb of the electronic business, someone began to suspect that the electronic business was overrated. Maybe the Internet is no longer a great dream to make money, but after all these years of washing, the internet has become a part of the public's life, it can be seen from the general knowledge that Taipei's native Chinese can make a Web page, and it is evident that, as the web becomes generally known, to survive on the Internet, not being able to specialize will be a decisive factor.

Under the. NET framework, the PEN is pleased that the ASP (Active Server Pages) has become more professional, simply back to the ASP, we can at least point to a few points:
  • ASP can only be developed using VB Script or Java script in these two programming languages.
  • There is no good Bug program (Debugger).
  • The web structure is chaotic as the program becomes larger.
  • ADO cannot be directly combined with a DataGrid element.

This issue will explain to you the new look of ASP (this new ASP is called
from ASP to

ASP will become very red, I am afraid that even Microsoft also feel surprised, because the ASP has been attached to IIS, is not a stand-alone product. The IIS version and the ASP version have the following: IIS version is attached under IIS ASP version IIS 3.0ASP 1.0IIS 4.0ASP 2.0IIS 5.0ASP 3.0
Someone will use 1.0, 2.0, 3.0 parts of the ASP version, but the pen does not, because from the ASP 1.0 to 3.0 version, the software does not spend too much effort to improve the ASP, just because of the revision of IIS, so the ASP also followed the revision of the micro, so from the ASP Version 1.0 to version 3.0 has no noticeable change in functionality, so regardless of ASP 1.0, 2.0, or 3.0, the pen is called ASP.
As the ASP's users become more and more, I hope that the ASP's better voice will become stronger, perhaps it is from the good and the stream, perhaps for the push of the. NET Framework, Microsoft has done a market survey for the users of the ASP, to find out where the ASP must improve, and to develop the next generation of ASP, Which is (or asp+).

Asp. Compatibility between NET and ASP

From the ASP upgrade to the, the most worried question may be "will not affect the existing ASP Web page," The pen to the ASP platform to upgrade to the ASP. NET platform (the version installed in this article is Beta 1), and no existing ASP Web pages are available or must be modified.
In fact, when you are browsing the ASP Web (as a. asp), IIS will activate Asp.dll to run the ASP Web, and when the Web page (with the. aspx file name) is being used to browse, IIS will activate the Xspwp.exe to run the web, which is different from the file, so not just install, it does not affect the operations of both ASP Web pages, and the ASP Web and Web pages are actually stored.
Another common question is: Do you need to convert the existing ASP Web pages into web pages? Since the ASP Web and Web pages are stored, the ASP Web page that works well can be temporarily unmodified, as to which Web pages must be The following is the suggestion of the pen person:
  1. Hopefully more efficient: when the Web page is first seen, the server translates it into MSIL (Microsoft intermediate Language) and saves it, which is no longer being translated again (unless.) The content of the ASPX file has changed, so it can improve performance. In addition, ASP. NET also has the homepage and the data cache function (see later introduction), may lift the website the response speed.
  2. A Web page that requires constant maintenance or modification: As uses VB7 as a programming language, it is equipped with a complete object-directed function that helps protect the web.
  3. New Web page: Since the feature is superior to ASP, the future Web page will use
changes in programming language

From ASP to, where the changes are more than the most relevant to the ASP Web Author should be the change of the program language, the ASP only accept VB Script and Java Script two programming language, But for, all the programming languages that can be translated into MSIL are acceptable programming languages.
The pen is in the run! The ".net Framework for the first 3 pcs--A new generation of software development--the article is about MSIL, an intermediary language between high-level programming languages (such as VB) and the language of the machine code, At the bottom of the, our written programming language is also first translated into MSIL, then the MSIL is then translated into a machine code to perform, and the process is also used in this mode, in addition to the -1, browser, the web page works the same way as any other language.

Map-1 web translations to perform the

The quality of performance

The first person to touch the Web page might have this question: "Does performance seem inferior to the ASP Web?" "For this question, let the pen start from the mode of operation, first look at-2, to see that Web page more than the ASP Web translation work.

Diagram-2 comparison between ASP and mode

Although is more than an ASP Web translation work, this does not mean that performance is necessarily worse, the translation of the -2, stage two is more than ASP, but is slower than ASP, and, simply speaking, phase one and phase two together >asp time to perform.
If you look at the above comparisons, ASP. NET is slower than ASP, but please divide the Web browser into the following two situations: (1) The first time the Web page is being browse (2) The second time you have been browsing the Web page, the first time you've been browsing through two stages of translation, so it's slower, but after the first -3,, The MSIL is stored, so when the same web is being browse for the second time, it takes only a few minutes for the MSIL to be translated into the machine and then the results are faster than the ASP Web, and the overall comparison is as follows: (> faster) Web page for the second time browse > ASP web > Web page for the first time browse

Map-3 The difference between first browsing and second browsing

Use of. NET Framework Objects

Microsoft claims that the. NET framework has many good but what the pen is most interested in is the objects provided by the. NET Framework, the. NET Framework provides more than a few objects, including data structures, databases, drawings, Web, XML, execute, catalogue services, Security... And so on, there should be.
In the past ASP Web pages can use ActiveX objects, but it is limited to ActiveX objects in the ActiveX DLL, unlike general application (such as VB program, C + + program) can use the same time ActiveX DLL, ActiveX EXE and ActiveX Component and many other ActiveX objects, but this image has improved under the. NET Framework, except for the number of objects in the. NET Framework that are related to the screen (for example, WinForm and console). is not available on the Web page, other objects are available Web pages.
Registration: WinForm contains objects of Windows (window), the console is the object of the DOS text output mode, For, its output is a browser, so it is not possible to input Windows window and DOS text windows, specialized output objects are called WebForm, which is not available for use by Windows applications.
WebForm and server control components

In the ASP's Web page, if we want to design a input form, we probably can only use HTML input (or called a control Element), ASP. NET has done a lot in this area, in its webform, we can place various control elements (called server control Components), these control components include: server control element function checkbox, CheckBoxList the function of the HTML check cube radiobutton, RadioButtonList, and the function textbox with the HTML selection button add the function of the HTML text input cube, DropDownList the features of the HTML Pull-down menu table, TableRow, TableCell, and the functionality of the HTML table, add strong HTML text function image, ImageButton the function of HTML graphics LinkButton, Hyperlink the functional panel with HTML connections can divide the control elements into multiple sections AdRotator the calendar date of the display and select the data validation control elements can be used in situations where no programming is written To help us verify that the data that the user is entering is correctly displayed in the DataGrid, DataList, and repeater data library.
In addition to providing a richer control element, another advantage of WebForm is that you can record the status of your Web page, where you have to use session or cookie objects to record client side state in the ASP Web, but whether it's a session or a Cookie object, Must be available for the user to open the browser's cookie function, ASP. NET improves the image, so long as we place the server control element in the WebForm, WebForm will record all the server control elements (such as the text that is entered in the control component).
The ability to record control element state is most convenient to divide into multiple input forms. For example, in the input form of 4, if you use ASP's design, the data that is entered in step one and step two must be recorded in the session or cookie object for step three reading, But for web pages, as long as the server control element of step one, step two, step three is placed in the same webform, you can read the information that the Internet has entered in the server control element no matter which step the web takes.

Graph-4 divided into multiple input forms

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