Last post Jul 06, 2009 05:23 AM by enewmen
Feb 22, 2008 04:40 AM|maheshdotnet|LINK
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?
Feb 24, 2008 11:09 PM|Nai-Dong Jin - MSFT|LINK
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.
Feb 25, 2008 12:01 AM|maheshdotnet|LINK
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.
Jun 24, 2009 10:04 PM|enewmen|LINK
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?
Jun 26, 2009 05:52 AM|Bullonprowl|LINK
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
<filter name="isXHTML" compare="PreferredRenderingType" argument="xhtml-mp"/>
Jun 26, 2009 11:27 PM|enewmen|LINK
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!
Jul 03, 2009 11:53 AM|tovishal2001|LINK
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.
Jul 04, 2009 01:43 PM|enewmen|LINK
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?
Jul 06, 2009 02:18 AM|Bullonprowl|LINK
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.
Jul 06, 2009 05:23 AM|enewmen|LINK
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";
Have this simple app run on any mobile phone browser that fully supports XHTML MP 1.0/1.1