XHTML Mobile Profile

Last post 07-06-2009 5:23 AM by enewmen. 9 replies.

Sort Posts:

  • XHTML Mobile Profile

    02-22-2008, 4:40 AM
    • Member
      183 point Member
    • maheshdotnet
    • Member since 01-28-2008, 6:29 AM
    • Posts 37

    Hi all

    I want to develop mobile application with use of "XHTML Mobile Profile".

    As you might be aware that XHTML MP (XHTML Mobile Profile) is the markup language of WAP 2.0. XHTML MP is a subset of XHTML, which is the combination of HTML and XML.

    I am an asp.net developer and I have no idea of how can I use my asp.net knowledge in developing WAP 2.0 application with use of .net.

    Can any one guide me to make a start off?


    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: XHTML Mobile Profile

    02-24-2008, 11:09 PM
    Answer

    Hi,

    From your description, it seems that what you want is to render XHTML markup while you using ASP.NET mobile web controls in your application, right?

    You should install “ASP.NET Mobile Controls XHTML Adapter Source”. This package contains the source code for the XHTML adapter, one of several adapters available for use with the Microsoft ASP.NET mobile controls.

    Download details: http://www.microsoft.com/downloads/details.aspx?FamilyID=9642963f-7c8d-4b26-a440-400e03ced4cb&displaylang=en#RelatedLinks

    Thanks.

    Michael Jin.
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: XHTML Mobile Profile

    02-25-2008, 12:01 AM
    • Member
      183 point Member
    • maheshdotnet
    • Member since 01-28-2008, 6:29 AM
    • Posts 37

    Thanks a lot dear.

    I am trying the link suggested by you. You are the only person who have tried to answer my question.

    Thank you very much once again. 

    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: XHTML Mobile Profile

    06-24-2009, 10:04 PM
    • Member
      10 point Member
    • enewmen
    • Member since 02-24-2009, 1:12 AM
    • Posts 6

    Thanks for the posts.

    It seems though XHTML MP is unsupported by Microsoft since 2005.

    How can I make this work in Visual Studio 2008?


    thanks!

  • Re: XHTML Mobile Profile

    06-26-2009, 5:52 AM
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 10:04 AM
    • Chennai
    • Posts 87

    Hi,

    you can try using device filters available in web.config. add the below code to web.config devicefilters section. If you are using MDBF change the "xhtml-mp" in argument to "xhtml-basic". You must use devicespecific /  choice filters if you want to work like this.

    <filter name="isXHTML" compare="PreferredRenderingType" argument="xhtml-mp"/>
    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
  • Re: XHTML Mobile Profile

    06-26-2009, 11:27 PM
    • Member
      10 point Member
    • enewmen
    • Member since 02-24-2009, 1:12 AM
    • Posts 6

    From the post, it seems as simple as adding/changing the DOCTYPE to XHTML-MP in the web.config file. (to make WAP 2.0 work in Visual Studio 2008)

    I can then use the filter to to make the web site device specific.

    If there is anything more, please give me a link to some article that explain this in more detail..


    Thanks for the post!


  • Re: XHTML Mobile Profile

    07-03-2009, 11:53 AM
    • Member
      2 point Member
    • tovishal2001
    • Member since 07-05-2008, 9:10 AM
    • Posts 5

    Everyone knows that, Mr.MSFT . Also explain how to use it.


    As everyone knows we can add Xhtml source suggested as above to the project. But what he didn't suggest is how to make ASP.Net realize the new device capabilities. Even if you add Xhtml Source to your solution, ASP.Net will still identify the incoming requests as from WML 1.1 devices and render low profile wml markup instead of Xhtml.


    So please teach how to use it also. Don't throw links on people. Thats not helpful.

  • Re: XHTML Mobile Profile

    07-04-2009, 1:43 PM
    • Member
      10 point Member
    • enewmen
    • Member since 02-24-2009, 1:12 AM
    • Posts 6

    I read a lot about XHTML MP standards, but I never saw a complete working ASP.NET project with XHTML standards and code-behind.  All the examples where HTML only with scripts. By the way, most old phones can't display scripts.

    I tried using normal web server controls in Visual Studio 2008, but that got a low ready.mobi score and didn't render on most old phones (I never had problems on a  Nokia n95 for example). I also tried the Mobile Web controls (using the mobile web template and controls). But that made a WML site that completely failed the ready.mobi test.

    Today I read in a post today a ASP.NET web form can use plain old -->HTML 4.0 controls<--. Including the button onserverclick event.  http://forums.asp.net/p/1427819/3189151.aspx.  It seems I was barking up the wrong tree, searching hard for mobile controls or making server controls work.

    So, if I put 2 and 2 together, by using HTML 4.0 controls & a correct DOCTYPE, I should finally have a ASP.NET web application that should be: 100% XHTML MP compliant, have basic events, c# code behind,  pass the ready.mobi test, and run on most mobile web-browsers. 

    If this work, I'll try to remember to come back and let people know. Any comments on this?

  • Re: XHTML Mobile Profile

    07-06-2009, 2:18 AM
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 10:04 AM
    • Chennai
    • Posts 87

    Hi tovishal2001 & enewmen

    Tovishal: Asp.net by default needs device.configs files or MDBF files or Capabilities at application level (at your web.config). It will not give the exact capabilities of a requesting phone by default. it needs any one of the resourses mentioned above to give details (its bad actually) depending on the framework. If you use MMIT (.net 1.1) you need device.config files, if you use .net 2.0 you can use (web config settings <browsercaps> or .browser files, if 3.5 you can take advantge of MDFB file (http://mdbf.codeplex.com/). if you need further info let me know.

    Enewmen: i completely agree with you. i can understand your frustration. a lot of downsides are there using mobilecontrols/web controls rather i will put this way using .Net for cellular phones. Most of the devices (70%) wont render your page if you use web controls instead of mobile controls. All the devices will render WML by default if you didnt specify its rendering type or capabilities which is like something similar to hardcoding. i hate this concept.

    As i have said earlier, you make use of devicefilters and take advantages of tables, colors.

    Scripts, i havnt seen it working in any other the Devices, except which uses Mozilla/IE browsers.

    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
  • Re: XHTML Mobile Profile

    07-06-2009, 5:23 AM
    • Member
      10 point Member
    • enewmen
    • Member since 02-24-2009, 1:12 AM
    • Posts 6

    So,

    Can I use plain HTML 4.0 controls & Forms or do I need special Mobile Web controls & Forms to render correctly?

    From using the emulators, HTML 4.0 controls seem to work, but I don't know if this is the "correct way" to make mobile web apps.

    Can SOMEONE make a SIMPLE mobile web app? HTML and code behind?  Something like this:

    Download the moble web controls

    add the controls to Visual Studio 2008 Toolbar

    Create a ASP.NET Web Application (C# or VB.NET)

    Add the correct DOCTYPE and MIME to the HTML.

    Add a mobile Textbox and button to the Form.

    Add a Click event for the button.

    On the button OnClick, the code behind is called, textbox1.Value = "Hello";

    That's it..

    Have this simple app run on any mobile phone browser that fully supports XHTML MP 1.0/1.1


    Thanks!

Page 1 of 1 (10 items)