When saving program files, the "&ldquo" should be used.

by cwf9vrms1 on 2012-02-24 10:48:16

Using ASP techniques can develop dynamic WAP pages. If ASP technology is combined with database technology, it can develop more complex WAP applications. For knowledge about ASP and Web databases, please refer to specialized books. Here, we will use WML as an example to explain the application of ASP and database technology in WAP development.

11.2.1 Using ASP in WML Programs

The rules for using ASP in WML programs are very simple. Just follow these five steps:

(1) Declare the scripting language used by ASP. This is similar to the method used in ASP declarations, with the format: %@ Language=VBScript %.

(2) Declare the WML file type. This can be done using ASP's Response object and setting ContentType as its method, written in the following format: .

(3) On the WAP server side, enhance the server's ability to handle ASP. This can be achieved in IIS by selecting the WAP site or its main directory, right-clicking, choosing "Properties" from the menu that appears, opening its dialog box, and selecting the "Virtual Directory" tab. There is an application setting option here. Set the "Allow" item to "Execute (including scripts)". For more detailed methods, please refer to Chapter 4 of our book.

(4) Other statements and forms can use WML programming methods.

(5) When saving the program file, use the ".asp" extension.

For example, below is a simple example of using ASP in a WML program:

```wml

Hello! This is a program that displays "Hello!"

```

This program can be saved as hello.asp. Note that the file extension must be .asp; it is different from hello.wml. We can place or upload this file to the corresponding directory on the WAP server, such as the wap directory. Then, start the emulator browser, like WinWap, and enter "http://127.0.0.1/wap/hello.asp" in the URL bar and press Enter to view the results of browsing the WML page using ASP.

Relevant thematic articles:

Reasons why keyword rankings are high but inclusion has drastically decreased and thus fail to provide user experience.