[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

xhtml-mp (mobile profile) with ASP.NET 2.0 or later

Alek

4/5/2009 9:35:00 AM

Dear All,
I'm really confused about use of "System.Web.UI.MobileControls" namespace.
And I'm really surprised not find any solution on forums.

My question is simple:

How create xhtml-mp pages using "System.Web.UI.MobileControls" classes?


For example, starting from simple ASP.NET code that use System.Web.UI.MobileControls , like this

1 <%@ Page Language="C#" AutoEventWireup="true" Inherits="WebApplication1.Default1" Codebehind="Default1.aspx.cs" %>
2 <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
3
4 <html xmlns="http://www.w3.org/1999/x... >
5 <body>
6 <mobile:Form id="Form1" runat="server">
7 Hello!
8 </mobile:Form>
9 </body>
10 </html>



render on browser the xhtml-mp code with <?xml> and <!DOCTYPE> declaration (including usual javascript automatically generated for post), like



1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd...
3 <html xmlns="http://www.w3.org/1999/x... >
4 <body>
5 <form id="Form1" name="Form1" method="post" action="Default1.aspx?__ufps=898015">
6 <input type="hidden" name="__EVENTTARGET" value="">
7 <input type="hidden" name="__EVENTARGUMENT" value="">
8 <script language=javascript><!--
9 function __doPostBack(target, argument){
10 var theform = document.Form1
11 theform.__EVENTTARGET.value = target
12 theform.__EVENTARGUMENT.value = argument
13 theform.submit()
14 }
15 // -->
16 </script>
17 Hello!
18 </form>
19 </body>
20 </html>



and NOT code without <?xml> and <!DOCTYPE> declaration (that is what happen now using MobileControls):

1 <html><body>
2 <form id="Form1" name="Form1" method="post" action="Default1.aspx?__ufps=898015">
3 <input type="hidden" name="__EVENTTARGET" value="">
4 <input type="hidden" name="__EVENTARGUMENT" value="">
5 <script language=javascript><!--
6 function __doPostBack(target, argument){
7 var theform = document.Form1
8 theform.__EVENTTARGET.value = target
9 theform.__EVENTARGUMENT.value = argument
10 theform.submit()
11 }
12 // -->
13 </script>
14
15 Hello!
16 </form></body></html>




Is it possible ? Have I to use .browser files ?

If it's not possible by System.Web.UI.MobileControls, what is best practice to create xhtml-mp site using ASP.NET?

In order to pass ready.mobi test ! !

Thank you
Alek
1 Answer

Naked Gonad

11/6/2008 7:30:00 PM

0

Peter Hucker wrote:
> On Mon, 27 Oct 2008 19:57:57 -0000, Eli Grubman <eli.grubman@googlemail.com> wrote:
>
>> On Mon, 27 Oct 2008 18:34:12 -0000, "Peter Hucker" <none@spam.com>
>> wrote:
>>
>>> On Tue, 21 Oct 2008 21:44:51 +0100, Naked Gonad <bodron57@tiscali.co.uk> wrote:
>>>
>>>> John "C" wrote:
>>>>> "Peter Hucker" <none@spam.com> wrote in message
>>>>> news:op.ujdyuvie4buhsv@fx62.mshome.net...
>>>>>> On Wed, 15 Oct 2008 18:59:36 +0100, Naked Gonad
>>>>> <bodron57@tiscali.co.uk> wrote:
>>>>>>> Peter Hucker wrote:
>>>>>>>> On Sun, 12 Oct 2008 14:37:59 +0100, Eli Grubman
>>>>> <eli.grubman@googlemail.com> wrote:
>>>>>>>> Wimps!
>>>>>>>>
>>>>>>> Sensible!
>>>>>> Sensible for wimps perhaps.
>>>>>>
>>>>> Like you, Phucker...
>>>>>
>>>>> Your Pal,
>>>>> HJ
>>>>>
>>>> Scotland, the brave!
>>> Oh I dunno, there's loads of wimps around here too. People actually wearing GLOVES and a HAT when it's +8C outside!!!
>> In Newcassle, you're supposed to wear nothing more than a shirt until
>> it gets below freezing.
>
> I don't wear a shirt above freezing.
>
Saves on the washing.