|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Combining WML & ASP
How do I combine WML and ASP to create dynamic pages for viewing on WAP enabled mobile phones? I know that when i request a page from my mobile it must request a .wml page such as mypage.wml but for there to be some serverside processing using ASP the file needs to end in a .asp extension. How do i do it? Do i have my ASP in the WML page or does my WML page need to somehow call an ASP page which then in turn outputs a WML page somehow?
Thaks in advance Chris |
|
#2
|
|||
|
|||
|
Hi Chris,
There's a few things that you need to do to use ASP with WML. All very simply though if you know ASP and WML to a minimal extent: 1) As you know already, the extension of any WML page that includes ASP scripts needs to be .asp and not .wml 2) Secondly, at the top of the page, you need to add these headers to tell the server that although your WAP page has a .asp, it is a WAP page to be dealt with in a WAP way. Code:
<% 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"> 3) In regards to the structure of the page, you simply create the WAP code as you would for a simple .wml page, and just like ASP in HTML pages, you simply interweave the ASP code into the WML code through the use of the <% and %> tags. There's a number of tutorials available on the net (ASPFree has some I believe) so have a look and see if they help. Good luck! Lloyd |
|
#3
|
|||
|
|||
|
so i'm assuming this would be the same method for using wml in jsp , servlets and php ?
__________________
FreeBSD , dooing more with less since 10 years ago |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > Combining WML & ASP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|