Using Quickwap components and ASP to build WAP site 1th/2 page _ Application Tips

Source: Internet
Author: User
Tags prepare
using Quickwap components to build WAP site Tutorials-Prepare articles

First of all, we need to get a brief look at what is Quickwap,quickwap V1.0 Lite is a component based on the WAP1.2 protocol that uses a VB6 developed to write WAP pages in a secondary ASP+WML language.

Second, we want to install Quickwap V1.0 Compact version

The installation process is as follows:

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

The Windows 2000/server/advanced Server operating system is:

system drive Letter: \winnt\system32\

The Windows xp/2003 operating system is:

system drive Letter: \windows\system32\

2. Register the control.

Start Menu-〉 run Regsvr32 QuickWap.dll command.

  

After successful registration, the pop-up dialog box is as follows:

  

Next we can detect whether the QUICKWAP.DLL has been successfully installed, create a new ASP file, the following code:

If you run this file through IIS, the following figure indicates that the installation is successful and you can use the component.

Note: Before using Quickwap, make sure the server is configured with a WAP MIME type.

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

The following are the MIME types configured to configure WAP in IIS:

First, start IIS

Start menu-Settings-Control Panel-Administrative Tools-internet Information Services (IIS) Manager

Second, right click on the local computer to view properties

Third, open MIME type, you can add the above data in

  

Using Quickwap components to build a WAP site tutorial-the actual story

Now we're starting to learn how to write WAP code with the Quickwap component.

1> Framework PageHeader and PageFooter

PageHeader

Function: PageHeader is used to set WAP page access control information, caching functions, output the WAP file header and generate a card.

Syntax: Wap.pageheader ("CacheControl", "Forua", "Otheratt")

Description: CacheControl max-age Specifies the lifetime of deck in the cache, the smallest unit is seconds, and if 0 is specified, the deck is invoked each time by connecting to the server.

Forua Forua is an optional attribute that specifies whether the label is deleted by the intermediary agent before the WML file is uploaded to the client (because the protocol for the transfer may change) and the default value is False.

Otheratt is used to set other property values. The property values can be enclosed in single quotes or two double quotes.

such as "Name= ' Bicyle '" can be replaced with "Name=" "Bicyle" "".

Additional properties added here will be added to the front.

For example: Wap.pageheader ("max-age=300")

PageFooter

Function: End function for output WAP file

Syntax: Wap.pagefooter

File instance:

The new kj.asp code is as follows:

Effect Demo:

  

2> output Functions Writeout and Writerow

Role: They are to the output of the text to UTF-8 transcoding, and then output.

For example: Wap.writeout "Content" & "

"

Description: Content The string used to prepare the output

The difference between Writerow and Writeout lies in the following:

, that is, we can omit the following in the output

, and the line wraps automatically when the output is printed. For example, we still want to output "Welcome to use Quick WAP component development!" This sentence, the code can be written like this:

For example: Wap.writerow "Welcome to use Quick WAP component development!"

File instance:

Create a new write.asp with the following code:

Effect Demo:

3> Hyperlink Function A

Function: Functions that form hyperlinks are simple to use Quickwap to implement hyperlinks.

For example: Wap.writerow wap.a ("Title", "Url", "DisplayText"),

Description: Title displayed in the lower left corner of the phone or the lower right corner of the message displayed.

URL link address, can be a relative path or absolute path.

DisplayText is the link text that is displayed on the screen.

Note: They must be separated by commas (,) so that the function is not reminded.

File instance: New a.asp, code as follows:

Effect Demo:

  

Current 1/2 page 12 Next read the full text
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.