Build Wap site page 1/2 with QuickWAP components combined with ASP

Source: Internet
Author: User

Build a Wap site using QuickWAP components-preparation

First, let's take a brief look at what QuickWAP is. QuickWAP V1.0 Lite version is a component used to compile WAP web pages using ASP + WML language developed by VB6 Based on the WAP1.2 protocol.

Install and install QuickWAP V1.0 Lite version.

The installation process is as follows:

1. First copy the QuickWAP. dll file to the system32 directory.

Windows 2000/Server/Advanced Server:

System drive letter: \ WINNT \ system32 \

Windows XP/2003 OS:

System drive letter: \ Windows \ system32 \

2. register the control.

Start Menu> run the Regsvr32 QuickWap. dll command.

  

After successful registration, the dialog box is displayed as follows:

  

Next, we can check whether Quickwap. Dll is successfully installed and create an ASP file. The Code is as follows:

If you run this file through IIS, for example, it indicates that the installation is successful and you can use this component.

Note: Before using QuickWAP, make sure that the wap mime type is configured on the server.

Associated Extension

MIME Type

Wml

Text/vnd. wap. wml

Wmlc

Application/vnd. wap. wmlc

Wbmp

Image/vnd. wap. wbmp

Wmlsc

Application/vnd. wap. wmlscriptc

Wmls

Text/vnd. wap. wmlscript

Wsc

Application/vnd. wap/wmlscriptc

Configure the MIME type of WAP in IIS:

1. Start IIS

Start Menu-settings-control panel-management tools-Internet Information Service (IIS) Manager

2. Right-click the local computer to view the properties

3. Open the MIME type to add the above data

  

  

Tutorial on using QuickWAP components to build a Wap site-Practice

Now we will start to learn how to use the Quickwap component to write Wap code.

1> framework PageHeader and PageFooter

PageHeader

Purpose: PageHeader is used to set the access control information and cache of WAP pages. It outputs the WAP file header and generates a card.

Syntax: Wap. PageHeader ("CacheControl", "forua", "OtherAtt ")

Note: CacheControl max-age specifies the lifetime of a DECK in the cache. The minimum unit is seconds. If it is set to 0, you need to connect to the server to call the DECK each time.

Forua is an optional attribute that specifies whether the tag is deleted by the Intermediate proxy before the wml file is uploaded to the client (because the transfer protocol may change). The default value is false.

OtherAtt is used to set other property values. The attribute values can be enclosed in single or two double quotation marks.

For example, "name = 'bicyy'" can be replaced by "name =" "Bicyle.

The additional attributes added here will be added to the front edge.

For example, Wap. PageHeader ("max-age = 300 ")

PageFooter

Function: Used to output the end function of the WAP file.

Syntax: Wap. PageFooter

File instance:

The code for creating kj. asp is as follows:

Demo:

  

2> output functions WriteOut and WriteRow

Role: they are UTF-8 Transcoding of the text to be output, and then output.

For example, Wap. WriteOut "Content "&"

"

Note: Content is used to prepare the output string.

The difference between WriteRow and WriteOut lies in the following:

In other words, we can omit

And the output will automatically wrap. For example, we still want to output "Welcome to Quick WAP component development! "The code can be written as follows:

For example: Wap. WriteRow "welcome to the Quick WAP component! "

File instance:

Create Write. asp with the following code:

Demo:

3> hyperlink function

Purpose: functions used to form hyperlinks. Using QuickWap to implement hyperlinks is very simple.

For example, Wap. WriteRow Wap. A ("Title", "Url", "DisplayText "),

Note: The Title is displayed in the lower left or lower right corner of the mobile phone.

Url, which can be a relative or absolute path.

DisplayText is the link text displayed on the screen.

Note: These functions must be separated by commas.

File instance: Create A. asp with the following code:

Demo:

  

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.