locked
XHTML Mobile 1.0 and CSS RRS feed

  • Question

  • User-25724793 posted

    I am having a very hard time finding information related to XHTML Mobile 1.0 in asp.net 2.0. For example: mobile.msn.com viewed with Openwave V7 Simulator, Version 7.0.107 outputs the following:

    <?xml version="1.0"  encoding="utf-8"?> 
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <title>MSN Mobile</title> 
    <style type="text/css"> 
    .s0{ 
    background-color: #ffffff; 
    } 
    .s1{ 
    font-weight: bold; 
    white-space: nowrap; 
    } 
    .s2{ 
    font-size: small; 
    white-space: nowrap; 
    } 
    .s3{ 
    font-size: small; 
    } 
    .s4{ 
    font-size: small; 
    text-align: center; 
    } 
    </style> 
    </head> 
    <body class="s0"><form id="MenuForm" method="post" action="default.aspx?__ufps=747036"> 
    <div><input type="hidden" name="__ET"/> 
    <div class="s1">MSN Mobile</div>
    <div class="s2">1 <img src="/content/images/icons/icon_mail.aimg" alt=" " border="0" /><a href="/hm/folder.aspx" accesskey="1" class="s3">Mail</a></div>
    <div class="s2">2 <img src="/content/images/icons/icon_search.aimg" alt=" " border="0" /><a href="http://m.live.com/search/default.aspx?mkt=en-us" accesskey="2" class="s3">Search</a></div>
    <div class="s2">3 <img src="/content/images/icons/icon_dwnld.aimg" alt=" " border="0" /><a href="http://mobile.search.live.com/client/" accesskey="3" class="s3">New! Search Download</a></div>
    <div class="s2">4 <img src="/content/images/icons/icon_messenger.aimg" alt=" " border="0" /><a href="/wlm/imcl.aspx" accesskey="4" class="s3">Messenger beta</a></div>
    <div class="s2">5 <img src="/content/images/icons/icon_messengerMSN.aimg" alt=" " border="0" /><a href="/im/im.aspx?sky=n" accesskey="5" class="s3">Messenger</a></div>
    <div class="s2">6 <img src="/content/images/icons/icon_spaces.aimg" alt=" " border="0" /><a href="http://mobile.spaces.live.com/?mkt=en-us" accesskey="6" class="s3">Spaces</a></div>
    <div class="s2">7 <img src="/content/images/icons/icon_local.aimg" alt=" " border="0" /><a href="http://m.live.com/search/local.aspx?mkt=en-us" accesskey="7" class="s3">Local</a></div>
    <div class="s2">8 <img src="/content/images/icons/icon_live.aimg" alt=" " border="0" /><a href="/portal/default.aspx?fr=l" accesskey="8" class="s3">Live.com beta</a></div>
    <div class="s2">9 <img src="/content/images/icons/icon_msn.aimg" alt=" " border="0" /><a href="http://beta.mobile.msn.com" accesskey="9" class="s3">New! MSN.com beta</a></div>
    <div class="s2"><img src="/content/images/icons/icon_msnbc.aimg" alt=" " border="0" /><a href="http://www.msnbc.msn.com" class="s3">MSNBC News</a></div>
    <div class="s2"><img src="/content/images/icons/icon_fox.aimg" alt=" " border="0" /><a href="http://fs.sorrent.com/fs/fe;linkurl=http%3A%2F%2Fmobile%2Emsn%2Ecom" class="s3">FOX Sports</a></div>
    <div class="s2"><img src="/content/images/icons/icon_weather.aimg" alt=" " border="0" /><a href="/wmlup/weather.asp?sky=n" class="s3">Weather</a></div>
    <div class="s2"><img src="/content/images/icons/icon_money.aimg" alt=" " border="0" /><a href="http://usmoneymobile.msn.com" class="s3">Money</a></div>
    <div class="s2"><img src="/content/images/spacer.gif" alt=" " border="0" /><a href="/wml/default.aspx?page=1" class="s3">More</a></div>
    <hr />
    <div class="s4">(C)2006 Microsoft.</div><div class="s4"></div>
    <div class="s4"><a href="http://mobile.live.com/wmlup/privacy.aspx?ru=http%3a%2f%2fmobile.msn.com%2fwmlup%2fdefault.aspx&mkt=en-US" class="s3">Privacy Statement</a></div>
    <div class="s4"><a href="http://mobile.live.com/wmlup/terms.aspx?ru=http%3a%2f%2fmobile.msn.com%2fwmlup%2fdefault.aspx&mkt=en-US" class="s3">Terms Of Use</a></div> 
    </div></form></body> 
    </html>
     

    I have been trying in VS 2005 to build an application that outputs something similar with no success. I thought this would be a relatively easy process using Mobile Web Forms but this is not the case as the adaptive rendering seems to have a mind of its own. My question is two fold, first is it possible to limit the Mobile Web Controls to output only XHTML Mobile 1.0, no adaptive rendering, no WML, no browser detection, just a valid XHTML Mobile 1.0 page for any request regardless of browser. Second, what is the best way to extend the Mobile Web Controls to include CSS style properties?

    Thanks,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Pauley

    Wednesday, March 7, 2007 4:14 PM

All replies

  • User-1179442337 posted

    hiya, if all you want for content output is XHTML Mobile 1.0 then i would use a normal asp.net website(non-mobile) and just change the headers in each page.

     

    this works for me, in both IE and most wap2.0 (XHTML) browsers:

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head><meta forua="true" http-equiv="Cache-Control" content="max-age=0"/><meta http-equiv="Cache-control" content="no-cache" forua="true"/><meta http-equiv="Cache-control" content="must-revalidate" forua="true"/><title>Pagetitle</title><link href="/style.css" rel="stylesheet" type="text/css"/></head>

    hope this helps.

     

    Wednesday, March 14, 2007 2:01 PM