Order
1. ASP foundation
2. Five major objects of ASP
3. REQUEST object
4. Response object
5. Server object
6. APPLICATION object
7. Session object
1. ASP foundation
Microsoft Active Server Pages, the ASP, namely the reader, is a set of Microsoft-developed server-side script environments, and the ASP is included in IIS, and the latest version of ASP 3.0 is included in IIS 5.0. With ASP, you can establish dynamic, interactive and efficient web server applications with HTML web pages, ASP instructions, and ActiveX controls. With ASP, you don't have to worry if the customer's browser can run the code you write, because all programs will be executed on the server, including all scripts embedded in ordinary HTML. When the program is executed, the server only returns the result of the execution to the client browser, which also reduces the burden on the client browser, which greatly improves the speed of interaction.
The ASP summarizes the following features:
Ø Use VBScript, JScript, etc., easy-to-understand scripting languages, combine HTML code to complete the website's application.
Ø No need to compile, easy to write, can be executed directly on the server side.
Ø You can write it with a normal text editor. In order to better conduct team development, Microsoft specially develops a development tool Visual InterDev, which is an integrated web application development system, including development, distribution, and management database driver. All features required for web application software.
Ø The script VBScript used by the ASP is executed in the web server, and the user-end browser does not need to perform these scripting languages.
Ø The source of ASP will not be passed to the customer browser, so that the written program can be plagiarized by others, thereby improving the security of the website.
Ø ActiveX Server Components has unlimited expansion. You can use Visual Basic, Java, Visual C , COBOL and other programming languages to write the ActiveX Server Component you need.
A plain text, HTML tag, and script command can be included in the ASP program. You only need to put the .asp program in a virtual directory of the web server (this directory must have executable permissions), you can access the ASP program by WWW.
Learning the basics of ASP to master:
Ø Learn the use of Microsoft Visual InterDev software.
Ø Installation and use of the ASP server.
Ø ASP is included in IIS, IIS 4.0 containing IIS 2.0, and the IIS 5.0 of Windows 2000 is included in IIS 3.0. If it is a normal Windows 98 user, it doesn't matter. Microsoft has also developed a server Personal Web Server for learning ASP. It is generally included in the formal version of the formal version of the Windows 98, as long as the Personal Web Server, Windows 98 Users can learn ASP programming.
Ø Proficiency in HTTP and HTML.
Ø Proficiency in VBScript or JavaScript.
Ø Proficiency in database knowledge. For example: Microsoft SQL Server, be familiar with ADO and ODBC, familiar with Transact-SQL language.
2. Five major objects of ASP
Request Object
Collection: QueryString, Form, Cookies, ServerVariable Main role: Read data in the submitted form or cookies.
Response Object
Property: Buffer, Cookies, ContentType, Expires, Expiresabsolute, Status, IsclientConnected, CacheControl
Method: Write, Redirect, end, flush, cookies, binarywrite, addheader, appendtolog
Main role: Output text, data, and cookies to the browser, and control each stage during the transfer web page.
Server Object
Property: ScriptTimeout
Method: CreateObject, MAPPATH, URLENCODE, HTMLENCODE
Main role: Creating a COM object and scripting component, and the like.
Application Object
Properties: LOCK and UNLOCK
The main role: Application object is used to place shared information between multiple users in the same application.
Session Object
Property: SessionID and TIMEOUT
Method: Abandon
Main role: maintain data for a single user.
3. REQUEST object
The Resquest object represents a request packet sent by each client to HTTP. In fact, the functionality of the Request object is one-way, which can only receive the data submitted by the client web page, just opposite to the RESPONSE object.
ResQuest Receives Data When two collection querystring and form retrieves the data of the form, which collection is used, depending on the Method property of the HTTP form submitted by the web page, when the Method property value is "Get", with querystring, Method The attribute value is "POST" with form. When the specific collection name is omitted, the ASP searches the following sequence: queryString -> form -> cookie -> ServerVariables.
hEAD>