Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Use WML and ASP to compile a dynamic mobile page
The combination of ASP and WAP can generate rich dynamic WML web pages, which can bring a lot of interesting content to WAP mobile phones. So how can they combine the two to generate dynamic web pages? In this article, I want to introduce how to use ASP to develop a dynamic WML application. For example, how can we build such an application when mobile phone e-banking is under fire? Here I don't want to discuss the establishment of the entire e-bank, because the content is too large and beyond the scope I can introduce. Here I just want to introduce it, how to use ASP to create an application to check your balance of payments. Considering its security, we need to use WTLS. However, this problem is complicated and can only be discussed later. We need to focus on how to use ASP to implement dynamic web pages.
Let's get started with so much nonsense! Assume that the bank account information is stored in the SQL database. If you use the corresponding network connection, you can access our system. In the example in this article, in order to simplify our account information, such as account number, customer name, security password, and account balance, in a table (tbl_account_info), there are four fields corresponding to accountno, custname, accountpin, and accountbal.
Next, I would like to briefly talk about programming ideas: first, the user enters our system interface and enters their account and security password (as shown in Figure 1). After verifying the login information, we allow users to log on to the system. We will give a welcome speech and output the balance between user names and accounts!
This is the general development idea. Well, now we can program based on this idea. I have a habit of writing dynamic code. I first write static code before trying to write dynamic code. I will also use this method in this article.
First, in the first part of the code, we will create a page to receive user login information.
Note the following code, which is the most basic WML code:
<% Response. ContentType = "text/vnd. wap. wml" %>
<? Xml version = "1.0" encoding = "gb2312"?> // Note that if you want to display Chinese characters, you must add encoding = "gb2312"
<! DOCTYPE wml PUBLIC "-// WAPFORUM // dtd wml 1.1 // EN"
<Card id = "login" title = "WAP e-bank">
Welcome to WAP e-bank <br/>
Enter an account: <input name = "accountno" type = "text" maxlength = "6"/>
Security password: <input name = "accountpin" type = "password" maxlength = "4"/>
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.