ASP Introductory Tutorials-asp Overview

Source: Internet
Author: User
Tags script tag

ASP is a server-side scripting environment for creating dynamic interactive Web server applications. In ASP Dynamic Web pages, not only can you include server-side scripting code, you can also use ASP to build objects and server components, and you can include server-side files.

First, add server-side scripts to ASP pages

A server script is a series of instructions used to issue commands to a Web server. To insert a server-side script into an ASP page, you first need to set the scripting language you use, with the following 3 ways to set up.

1), use @ LANGUAGE instruction

The @ LANGUAGE directive sets the language used to interpret script commands, with the following syntax format:

<%@ Language=脚本语言 %>

Attention

The @ Language directive must be placed in the first line of the document. There is a space between the "@" symbol and the keyword "Language".

2), the use of <Script> tag related properties

To include server-side scripts in your document, you can also use the Language property of the script tag to set all the scripting languages and use the Runat property to indicate that the script is running on the server side. For example:

<script language="VBScript" runat="server">
......
</script>

3), using the Internet information Services snap-in

You can use the Internet information Services snap-in to set the default scripting language for all ASP Dynamic Web pages that are installed on the Web service side. Here's an example of an XP system:

Select the start → program → manage →internet server command.

In the Internet Information Services snap-in window, select the default site. Right-click and select the Properties command to open the property sheet. On the Home Directory tab, click the Configure button. Click the Options tab, and in the Default ASP language box, enter the primary scripting language you want to use.

Simple example: Displays the 7 sizes of the font.

<%@ language=VBScript %>
<title>如何设置所使用的脚本语言</title>
<body>
<% for i=3 to 7 %>
<Font color="red" size=<%= i %>>
欢迎来闪客启航学习!<br>
</font>
<% next %>
</body>
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.