WAP development experience

Source: Internet
Author: User

The first two days due to work needs, the first request to do a WAP version of the website, to learn online for a day, get a beta version out (http://wap.luckty.com function is very general), sort out a few points of experience as follows:

1. WAP websites use WML identifiers rather than HTML, and traditional Javascript is no longer used. Instead, WMLScript is used. Therefore, the first contacts should first look at this topic. The learning resources are as follows:
Http://www.w3school.com.cn/wap/wap_intro.asp -- WML Learning
Http://www.w3school.com.cn/wmlscript/index.asp -- WMLScript Learning

2. Find a good WAP browser. A common browser cannot directly browse the WAP website, so you have to find a simulator. The following are some common ones:

A. Opera 9 or later versions (but it seems that WMLScript is not supported)
B. openwave
C. winwap
D. mshortate)

3. Build a test environment (taking IIS as an example)
The difference between a WAP website and a conventional website is that you need to add support for MIME types:
In the MIME type of the IIS Site. WML,. WMLS,. wmlc,. wmlsc,. wbmpYou can add these five suffixes.

4. vs. net2008 Configuration
Vs. net2005 can directly create a "Mobile webform", but in vs2008, a feature is removed, so you need to manually download the "mobile Web form template". For details, refer
Article http://www.cnblogs.com/3stones/archive/2009/01/05/1351969.html

5. To facilitate the test, you also need to force vs to output WML. In web. config, put the following content after <system. Web>.

<Browsercaps>
<Result type = "system. Web. Mobile. mobilecapabilities, system. Web. Mobile, version = 1.0.5000.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"/>
<Use VaR = "http_user_agent"/>
Preferredrenderingtype = "wml11"
Preferredrenderingmime = "text/vnd. WAP. WML"
Preferredimagemime = "image/vnd. WAP. wbmp"
</Browsercaps>

In addition, because many common controls are unavailable during WAP development, only some basic mobile controls can be used. In addition, other development methods are similar to conventional webforms.

 

Note:

1. When multiple parameters are passed, XXX. aspx? cannot be used? A = 1&B = 2, instead of XXX. aspx? A = 1& Amp;B = 2, otherwise it cannot be parsed on opera

2. if you directly use <% = "your content" %> In the aspx corresponding to mobilepage, no output will be obtained during the final operation. The correct method is to create a mobile user control, you can use the control in this way, and then place the control in the page.

3. the mobile control does not have a repeater control and can only be replaced by the Mobile: list control. However, I personally think this is not easy to use. It is better to generate a string directly in the background, then, use the method 2 to put it in the custom control and output it.

4. Almost every mobile control hasBreakafterProperty. The default value is true. That is, the <br/> flag is automatically added after each control. If you do not need to wrap the line, set this property to false.

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.