Application of ASP and database technology in WAP development
Source: Internet
Author: User
Data | Database using ASP technology can develop dynamic WAP page, combining ASP technology and database technology, can develop more complex WAP application. Knowledge of ASP and Web databases please refer to the special books, we take WML as an example to illustrate the application of ASP and database technology in WAP development.
Using ASP in WML programs
The rules for using ASP in WML programs are simple, as long as you do the following 5:
(1) Declare the scripting language used by ASP. Similar to the way declared in ASP, the format is:
<%@ Language=vbscript%>
(2) Declaring the WML file type. This can take the ASP's response object and use ContentType as its method, written using <% and%>, in the form of:
<% response.contenttype= "TEXT/VND.WAP.WML"%>
(3) in the WAP server side, increase the server to the ASP processing ability. This allows you to select the WAP site or its home directory in IIS and right-click, select Properties from the menu that appears, open its dialog box, and select the Virtual Directory tab. There is an application setting that sets the "license" to "execute (including scripts)". More detailed methods can be referenced in our 4th chapter.
(4) The rest of the statements and forms using WML programming method can be.
(5) The program file should be saved with an ". asp" extension.
For example, here is a simple example of applying an ASP in a WML program:
<%@ Language=vbscript%>
<% response.contenttype= "TEXT/VND.WAP.WML"%>
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "Http://www.wapforum.org/DTD/wml_1.1.xml" >
<wml>
<card id= "Main" >
<p>
Hello!
</p>
</card>
</wml>
This is a display "hello!" program, you can save it as a hello.asp. Note that the file name extension must be. asp, which is two different files from HELLO.WML. We can put the file in or upload to the corresponding directory of WAP server, such as WAP directory. We then start the simulation browser, such as Winwap, and enter "http://127.0.0.1/wap/hello.asp" in the URL bar and press ENTER to browse the effect of using the ASP's WML page.
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