ASP entry-Microsoft edition notes

Source: Internet
Author: User
The "processing instruction" of ASP <% @ keyword %> provides the information required for ASP to process the. asp file. For example, the following command sets VBScript as the main script language of the page:
<% @ LANGUAGE = VBScript %>
The processing command must be in the first line of the. asp file. To add multiple commands to the page, these commands must be in the same separator. Do not place the processing commands in the files included by the # include statement. A space must be added between the symbol @ and the keyword. The processing command has the following keywords:
The △language keyword is used to set the script LANGUAGE for. asp files. See use scripting language.
△ ENABLESESSIONSTATE keyword specifies whether the. asp file uses session statements. See manage sessions.
△ CODEPAGE keyword sets the code page of the. asp File (character encoding ).
The △lcid keyword sets the location identifier of the file.
△ TRANSACTION keyword specifies that the. asp file will run in the TRANSACTION environment. See understand transactions.
Key point: you can include multiple keywords in a command. Keywords/value pairs must be separated by spaces. Do not leave spaces on both sides of the equal sign.
In the following example, both the script language and the code page are set:
<% @ LANGUAGE = "JScript" CODEPAGE = "932" %>
When VBScript and ASP are used on the server, two VBScript features are disabled. Because scripts written using Active Server Pages are executed on the Server, VBScript statements InputBox and MsgBox used to provide user interface elements are not supported. In addition, do not use the VBScript functions CreateObject and GetObject in server scripts. Server. CreateObject should be used so that ASP can track object routines. Objects created by CreateObject statements or GetObject statements cannot access ASP built-in objects or participate in transactions.
Because all ASP scripts are processed on the server, there is no need to include HTML annotation tags to hide scripts in browsers that do not support scripts. This is the common practice of client scripts. All ASP commands are processed before the content is sent to the browser. You can use HTML comments to add comments to the HTML page. These comments are returned to the browser. If you view the HTML source file, you can see these comments. VBScript supports comments in the float format. Unlike HTML comments, these comments will be deleted during script processing and will not be sent to the browser.

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.