Site
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:
4> paging function. Easymorepage
Function: A simple long string paging function
Syntax: Wap.writeout wap.easymorepage ("Toshowcontent",)
Description: Toshowcontent Enter the string to be paged
Textlong the number of characters displayed per page.
File instance: New Easymorepage.asp code as follows:
Effect Demo:
5> Picture function img
Function: Functions for picture display
Syntax: Wap.writeout wap.img ("Url", "Tip", Otheratt)
Description: URL is the address of the picture, can be a relative path or absolute path
Tip When you can't display pictures or text messages that appear when you load them
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" "" "
For example: Wap.writeout wap.img ("Images/logo"). PNG ", build preview ...")
File instance:
The new file img.asp code is as follows:
Effect Demo:
6> Picture link function
Role: Used to form a function with a picture link
Syntax: Wap.writerow wap.imga ("Imgpath", "Url", "DisplayText")
Description: Imgpath the image's address, can be a relative path or an absolute path.
URL link address, can be relative path or absolute path
DisplayText the link text displayed on the screen
For example: Wap.writerow wap.imga ("", "#SecondCard", "second column")
File instance:
The new file imga.asp code is as follows:
The effect is as follows:
7> paragraph function p
Used to set paragraph alignment, whether to allow line wrapping wap.writeout wap.p ("alignment", "WrapMode")
There are three ways to alignment alignment: Left center right
WrapMode If the line is wrapped: Wrap nowrap
For example: Wap.writeout wap.p ("left", "wrap")
File instance:
The new p.asp code is as follows:
Effect Demo:
8>utf8 into Gb2312 function
function used to restore characters converted to UTF-8 encoding to Chinese character
Wap.writerow wap.utf8_gb2312 ("SearchString")
SearchString UTF-8 encoded strings to be converted
For example:
Wap.writeout wap.utf8_gb2312 ("We have a professional development team")
File instance:
The new file utgb.asp code is as follows:
Effect Demo:
Using Quickwap components to build a WAP site tutorial-end
Q: What if I'm not used to using the Quickwap component?
Answer: You can uninstall
The method is as follows:
Start Menu-〉 Run regsvr32/u QuickWap.dll command, you can uninstall off.
Q: Why do I feel that it is not customary to develop WAP with Quickwap components?
A: With the Quiwap component programming just may not be used to, after a while, you find it very easy to use, fast, and therefore like using QUICKWAP components