Close access to ASP + (1)

Source: Internet
Author: User

Author: http://www.aspcn.com flying knife

ASP + has been around for almost half a year, and we have made a lot of introductions on our site. But today, I finally had the idea to write an article about ASP +. Haha, let everyone wait for a long time.

First of all, I have to declare that this tutorial applies to people with certain network programming experience, such as asp, php, cgi, and jsp developers. If you do not know much about network programming, you should learn other languages first, otherwise you will have a lot to understand in the following articles. Haha.

Let's get started.

ASP + Runtime Environment

To learn ASP +, we must first build a debugging environment. To enable your "love chicken" to support asp +, you need the following conditions:

Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server

NGWS

IE 5.5

The above is the need to support ASP +. We can see that NGWS is only installed in Windows 2000. NT, Windows 98, and Windows Me are not supported yet, we will not promise that we will support asp + on other platforms in future versions. Please wait. And not all windows 2000 can be used. windows 2000 versions must be RC 3618 or later. Flying knife I used to be a windows 2000 version that was too low, so I had to give up the genuine version and buy the D version (all ASP + caused the fault ).

NGWS is a big header, there are 86M giant, flying knife brother my kitten ran for 5 hours to get it done, it is http://download.microsoft.com/download/platformsdk/Trial/1812.10full/NT5/EN-US/Setup.exe fortunately M $ rich, download site bandwidth is large, the download speed is fine. Let's take a look.

Internet Explorer 5.5 is the best solution. This is a flood of things now :) there are a lot of D versions, haha, it cannot be called D version, it is free of charge itself :)

ASP + comparison with ASP

There are many advantages of ASP +. Here are some of the most obvious ones.

Speed. ASP + is executed after compilation. That is to say, when the aspx file is compiled when it is requested for the first time, subsequent requests do not need to be re-compiled. ASP is an explanatory scripting language and needs to be re-compiled every time. For this reason, the speed cannot be compared with ASP +. However, the Compilation speed of ASP + is slow enough. The first execution speed is very slow for debugging on the local machine. But it will soon be done. The first task will be handed over to the Administrator. Let's enjoy the higher speed in the future :)

Functions, ASP + functions are extremely powerful, and we can almost do what we can think of on the network. Haha, a simple example is File Upload. In the ASP era, this problem can only be solved through components, but only the following code is required in ASP +. The following is an example:

<Html>
<Head>

<Script language = "C #" runat = "server">

Void Button1_Click (object Source, EventArgs e ){

If (Text1.Value = ""){
Span1.InnerHtml = "Error: you must enter a file name ";
Return;
}

If (File1.PostedFile! = Null ){
Try {
File1.PostedFile. SaveAs ("c: \ temp \" + Text1.Value );
Span1.InnerHtml = "File uploaded successfully to <B> c: \ temp \" + Text1.Value + "</B> on the web server ";
}
Catch (Exception exc ){
Span1.InnerHtml = "Error saving file <B> c: \ temp \" + Text1.Value + "</B> <br>" + exc. ToString ();
}
}
}

</Script>

</Head>
<Body>

<H3> <font face = "Verdana"> HtmlInputFile Sample </font>

<Form enctype = "multipart/form-data" runat = "server">

Select File to Upload: <input id = "File1" type = file runat = "server">

<P>
Save as filename (no path): <input id = "Text1" type = "text" runat = "server">

<P>
<Span id = Span1 style = "font: 8pt verdana;" runat = "server"/>

<P>
<Input type = button id = "Button1" value = "Upload" OnServerClick = "button#click" runat = "server">

</Form>

</Body>
</Html>

I believe everyone can understand the above program. It is not too difficult. It's so easy to use ASP + to upload files. I don't need any components at all. Haha, I only wrote the "aspcnUP Upload Component" for a long time ", after a piece of effort, M $ is done. Our components will also be laid off, alas, sadly. (The Flying knife sang with grief "The wind is cool, the water is cold, the heroes are gone forever ......")

ASP + can do more than that. Here is just a small example. We will introduce more functions later.

Another advantage of ASP + is structured programming. Its programming language can be added by itself. Currently, it supports C #, VB, and JavaScript. Are you disappointed that VBScript is not supported ?! :) This is the general trend, and you don't have to be disappointed. I will use C # To write routine articles in the future. Haha, if you love VB, you can also take a look at an article on the comparison between VB and C # syntax on this site, which is easy to get started. For C #, you may be unfamiliar, but let's look at the above program and find that he still has many places that are easy to use. I personally think it is a combination of C ++ and VB and Java. It may also be the first step for M $ to declare war on Java. If you use more, you will think it is more advantageous :)

When writing ASP + programs, you will think that you are writing VB or VC. Many of the ideas come from VB and VC. Maybe it is the reason for M $. NET. Therefore, we need to change our thinking about writing programs. We need to make you feel that you are writing software, not traditional asp programs.

Some other functions of ASP + are introduced in previous articles on our site. Haha, you can check them and we will learn about them through programs in the future. Unfortunately, the servers of our service provider cannot use asp +. Otherwise, we will learn more about asp + features.

Another concern is whether Windows 2000 with NGWS supports asp. If we have aspx, we will not have asp, and all the previous programs will be finished. You don't have to worry about this problem. During NGWS design, M $ has been considered. NGWS can also parse asp, and the file extension is. asp, use the asp Method for parsing, if yes. aspx is parsed using asp +, so your previous asp will not be reimbursed. Haha, you can rest assured. This is the case on the flying knife machine. Both aspx and asp can be used :)

The first section is here. Next section describes the syntax of asp +.


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.