The language feature of ASP (Active Server Page "comes from static text, and now many sites are almost use in this way. The disadvantage of static text is that it is difficult to maintain (the number of files), the query is difficult, and the modification is difficult. Although FrontPage can be used to manage the site, this is just one of the methods. Now, many sites will use the database in the background, dynamically generate hypersitations. In this way, to change the model, simply modify several files; to change the content, simply operate the database, and easy to maintain the system; for full-text search and other query applications, this method is more prominent. (Frequent "dynamic" also includes dynamic display of pictures, such as dynamic gif, java applet, etc., this article refers to Dynamicity Dynamicity) Universal Gateway Interface CGI (Common Gateway Interface) and Network Server Applications ISAPI (Internet Server Application programming interface The emergence of other related technologies allows us to easily communicate with Web Server, so that the CGI program such as some counters, the message is successively treated. But these CGI programs have a big shortcoming, that is, CGI (available for VB, Java, Perl, C or DEPHI et al.) And HTML can only be written separately, run separately, it is not easy to combine both. It is quite difficult to lead to maintenance and writing. Therefore, some vendors have later launched their own script language to enhance the functionality of web development. Where Netscape launches JavaScript (two types of For Client and For Server); Microsoft introduces two types of VBScript and ASP (Syntax's syntax of ASP), which is also used for server-side and client programs. For professional developers, the most important point of the client program is versatility, and the server-side emphasizes functionality and efficiency. For the development of Client-end programs, JavaScript is undoubtedly best, because both mainstream browser IE and Netscape today claim to support this standard; VBScript only IE can support. But what makes us distracted is that some of the JavaScript tags, some versions of IE or IE will not be supported, which must cause us to move some of the program to the server, because the server's program will explain the generation HTML (or ActiveX) text, then send it to the client, there is no compatibility problem. Likewire (JavaScript For Server End Compile), like ASP, is a manuscript language (manuscript means JavaScript similar to the Client), which can be nested inside the HTML text, just mark the program segment executed by the server) It is also the same object-oriented language like C / C . LiveWire's file hyperfix name or HTML, ASP's file subrush name is ASP, because the ASP file is interpreted when the client reads it, and the LiveWire's file must be pre-compiled (after each revision, To recompile it. ASP has a corresponding auxiliary development tool (INTERDEV) that can produce some controls. Of course, these are not important. The key is that you use Netscape Web Server or Microsoft IIS. But in general, because IIS is bundled in NT, users use IIS to be more. Since Netscape launched LiveWire and Microsoft launched an Active Server Page, the programmer was easy to write online programs and easily. But this Script class language has a common disadvantage, that is, because it is explained, the speed will not be too fast.
Recently, Microsoft recommends using a three-layer model. The intermediate layer can be used without ASP, and directly using the ActiveX control generated by VB6.0, because it is compiled, the speed is faster, but this is later. 1. ASP's basic object ASP (Active Server Page) is an object-oriented programming similar to VB. Here, there is no need to detail some basic concepts such as objects, but directly introduce its language characteristics so that developers can be able to modify and prepare the ASP program (because many people just use development tools such as Interdev to generate ASP programs) . First, the archive name of the ASP program is definitely "ASP"; secondly, in the ASP program, the Script of the server is in the middle of the <% and%> string, such as <% user = request ("user")%>. If you want to call another ASP file in an ASP file, you can add the following declaration in the ASP: , this is like C #Include in the language. Where Virtual represents the virtual file path, File represents a real file path. ASP has five main built-in objects: Request, Response, Server, Session, Application, which will be described below. 1.1 Request ASP still complies with the popular, using the client's Form to perform data exchange. The ASP built-in Request object has five methods for obtaining client data (QueryString / Form / Cookies / ServerVariables / ClientCertificate). Syntax: Request. Method Name ("Parameters) | Request (" Parameters) If the latter is adopted, the system will automatically select the appropriate method. 1.1.1 Form re-emphasizes some properties of FORM: