Tutorial on building a Wap site using QuickWAP components - Preparation
First, we need to briefly understand what QuickWAP is. QuickWAP V1.0 Lite is a component based on the WAP1.2 protocol and developed using VB6 to assist ASP+WML language in writing WAP web pages. .
Secondly, we need to install QuickWAP V1.0 Lite Edition.
The installation process is as follows:
1. First copy the QuickWAP.dll file to the system system32 directory.
The operating system of Windows 2000/Server/Advanced Server is:
system drive letter:WINNTsystem32
The operating system of Windows XP/2003 is:
system drive letter:Windowssystem32
2. Register the control.
Start menu -> Run Regsvr32 QuickWap.dll command.
After successful registration, the dialog box pops up as follows:
Next we can check whether Quickwap.Dll has been successfully installed and create a new ASP file with the following code:
If you run this file through IIS and get the following picture, it means that the installation has been successful and the component can be used.
Note: Before using QuickWAP, please make sure that the server is configured with the MIME type of WAP.
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:
1. Start IIS
Start Menu-Settings-Control Panel-Administrative Tools-Internet Information Services (IIS) Manager
2. Right-click the local computer to view properties
3. Open the MIME type , you can add the above data into it
Tutorial on building a Wap site using QuickWAP components - Practical Part
Now we will start learning to write Wap code using Quickwap components.
1> Framework PageHeader and PageFooter
PageHeader
function: PageHeader is used to set the access control information, cache, etc. functions of the WAP page, and output WAP file header and generates cards one by one.
Syntax: Wap.PageHeader("CacheControl"," forua"," OtherAtt")
Description: CacheControl max-age specifies the lifetime of DECK in the cache. The minimum unit is seconds. If it is specified as 0, it needs to be connected every time The server calls the DECK.
forua forua is an optional attribute that specifies whether the tag is deleted by the intermediate proxy before the wml file is transmitted to the client (because the transmission protocol may change). The default value is false.
OtherAtt is used to set other attribute values. The attribute values can be enclosed in single quotes or two double quotes.
For example, " name='Bicyle'" can be replaced by " name=""Bicyle""".
Additional properties added here will be added to the front of .
For example: Wap.PageHeader("max-age=300")
PageFooter
function: used to output the end of the WAP file Function
syntax: Wap.PageFooter
file example:
Create a new kj.asp code as follows:
Effect demonstration:
2> The function of the output functions WriteOut and WriteRow
: they convert the text to be output to UTF-8 and then output it.
For example: Wap.WriteOut "Content" & "
"
Explanation: Content is used to prepare the output string.
The difference between WriteRow and WriteOut is: the latter
, that is to say, we can omit the latter when outputting
, and will Automatic line wrapping. For example, if we still want to output the sentence "Welcome to use Quick WAP component development!", the code can be written like this:
For example: Wap.WriteRow "Welcome to use Quick WAP component development!"
File example:
Create a new Write.asp, the code is as follows:
Effect Demo:
3> Function of hyperlink function A
: Function used to form hyperlinks. It is very simple to use QuickWap to implement hyperlinks.
For example: Wap.WriteRow Wap.A("Title"," Url "," DisplayText "),
description: Title is displayed in The prompt information displayed in the lower left or right corner of the phone.
Url link address, which can be a relative path or an absolute path.
DisplayText is the link text displayed on the screen.
Note: They must be separated by commas (,). This is true for functions, no more reminder.
File example: Create a new A.asp, the code is as follows:
Effect demonstration:
4>Paging function.EasyMorePage
Function: Simple long string paging function
Syntax: Wap.WriteOut Wap.EasyMorePage("ToShowContent",)
Description: ToShowContent enters the string TextLong to be paged
and the number of characters displayed on each page.
File example: Create a new EasyMorePage.asp code as follows:
Effect demonstration:
5>Image function Img
function: function syntax for image display
: Wap.WriteOut Wap.Img("Url","Tip ",OtherAtt)
Description: Url is the address of the image, which can be a relative path or an absolute path.
Tip cannot Display pictures or text information displayed when loading.
OtherAtt is used to set other attribute values. The attribute values can be enclosed in single quotes or two double quotes. For example, "name='Bicyle'" can be replaced by " name=""Bicyle""".
For example: Wap.WriteOut Wap.Img("images/logo.PNG", "Generating preview...")
File example:
New The code of the file Img.asp is as follows:
Effect demonstration:
6> Image link function
function: used to form a function with image links
Syntax: Wap.WriteRow Wap.ImgA("ImgPath", "Url ", " DisplayText ")
Description: The address of the ImgPath image can be a relative path or absolute path path.
Url link address, which can be a relative path or an absolute path.
DisplayText is the link text displayed on the screen.
For example: Wap.WriteRow Wap.ImgA("","#SecondCard","Second Column")
File Example:
Create a new file ImgA.asp The code is as follows:
the effect is as follows:
7>Paragraph function P
is used to set paragraph alignment and whether to allow line wrapping. Wap.WriteOut Wap.P ("AlignMent ", "WrapMode ")
There are three AlignMent alignment methods: left center right
WrapMode whether to wrap lines: wrap nowrap
For example: Wap.WriteOut Wap .P("left","wrap")
file example:
Create a new p.asp code as follows:
Effect demonstration:
8>Utf8 to Gb2312 function
is a function used to restore characters converted to UTF-8 encoding to Chinese characters.
Wap.WriteRow Wap.Utf8_Gb2312("SearchString")
SearchString UTF-8 encoded string to be converted.
For example:
Wap .WriteOut Wap.Utf8_Gb2312 ("We have a professional development team")
file example:
Create a new file UtGb.asp code as follows:
Effect demonstration:
Tutorial on Building a Wap Site Using QuickWAP Components - Final Chapter
Question: What if I am not used to using QuickWap components?
Answer: You can uninstall it
as follows:
Start menu -> Run the Regsvr32 /u QuickWap.dll command to uninstall it.
Q: Why do I feel uncomfortable using QuickWap components to develop Wap?
A: You may not be used to programming with QuiWap components at first. After using it for a while, you will find that it is very easy to use and fast, and you will like to use QuickWap because of this. Components