locked
XHTML-MP with Mobile web forms RRS feed

  • Question

  • User214117797 posted
    After lots of reading online in relation to mobile web sites, it seems like the best way to develop multi device compatible sites is to you XHTML which in itself is not hard as it is simply HTML but much stricter.
    By using XHTML, I gain the ability to use basic HTML like tables and CSS styles, not to mention I can also take advantage of the mobile controls for the adaptive rendering to XHTML. So far am I right?

     
    If the above is possible, how do I go using XHTML in my mobile web forms. I implemented all the relevant XHTML tags but the web form still gets rendered either in HTML or WML based on my source browser. 
    How can I set up the web application so that all requests will be processed and rendered as XHTML?
    Do I have to setup a new device filter so that is always has a rendertype of XHTML?
    Do i need to make changes to the web.config?   

     

    Below is the markup up my mobile web form using valid XHTML, however when rendered by IE6, all the table tags are stripped so I dont get the table structure

    1    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
    2 <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
    3
    4 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    5 <html xmlns="http://www.w3.org/1999/xhtml">
    6 <head>
    7 <title>Table in XHTML MP</title>
    8 </head>
    9 <body>
    10 <mobile:Form id="Form1" runat="server">
    11 <table>
    12 <tr>
    13 <td>Cell A</td>
    14 <td>Cell B</td>
    15 <td>Cell C</td>
    16 </tr>
    17 <tr>
    18 <td>Cell D</td>
    19 <td>Cell E</td>
    20 <td rowspan="2">Cell F</td>
    21 </tr>
    22 <tr>
    23 <td colspan="2">Cell G</td>
    24 </tr>
    25 </table>
    26 </mobile:Form>
    27 </body>
    28 </html>

     

     

    Thanks,
    Jim 

    Thursday, September 27, 2007 7:35 AM

Answers

  • User1347187933 posted

    Some major WML features lost in XHTML MP: 1. XHTML MP does not support decks and cards 2. XHTML MP does not support timers 3. XHTML MP does not support events 4. XHTML MP does not support variables 5. XHTML MP does not support client-side scripting 6. XHTML MP does not support programmable softkeys 7. XHTML MP does not support the tag 8. XHTML MP does not support the format attribute for input fields 9. XHTML MP does not support posting of data with anchor links

    http://www.developershome.com/wap/xhtmlmp/xhtml_mp_tutorial.asp?page=wmlFeaturesLost 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 2, 2007 12:00 PM

All replies

  • User1347187933 posted

    Some major WML features lost in XHTML MP: 1. XHTML MP does not support decks and cards 2. XHTML MP does not support timers 3. XHTML MP does not support events 4. XHTML MP does not support variables 5. XHTML MP does not support client-side scripting 6. XHTML MP does not support programmable softkeys 7. XHTML MP does not support the tag 8. XHTML MP does not support the format attribute for input fields 9. XHTML MP does not support posting of data with anchor links

    http://www.developershome.com/wap/xhtmlmp/xhtml_mp_tutorial.asp?page=wmlFeaturesLost 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 2, 2007 12:00 PM
  • User214117797 posted

    Hi George,

    I am fully aware of the features lost in XHTML-MP/Basic but this is the most widely supported format and would only require me to create the 1 set of forms rather then creating 3+ templates for each type of device not to mention the horrible coding required with no strongly typed controls available at design time.
     

    Wednesday, October 3, 2007 7:31 AM