[lnkForumImage]
TotalShareware - Download Free Software

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


 

Chance Hopkins

3/21/2005 11:37:00 PM

No matter what I do, I can't force a page to have a wml content-type (or any
other type).

It seems that the MobilePage controls this somewhere internally.

Is there an override or property to control this?

The code below returns:
Content-Type: text/html; charset=utf-8

unless I remove " Inherits="System.Web.UI.MobileControls.MobilePage" " and
the form and control.

Then it returns:
Content-Type: text/vnd.wap.wml; charset=utf-8

Id like to use the MobilePage class and force the content-type if possible.

Any tips or clarity?

-------------------------------------

<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB" %>
<%
Response.ContentType="text/vnd.wap.wml"
Response.Write("<?xml version=""1.0"" encoding=""ISO-8859-1""?>")
%>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml...
<mobile:Form runat="server" ID="Form1" NAME="Form1">
Hello, world!<br />
<mobile:Label runat="server" Text="This is a label" ID="Label1"
NAME="Label1" />
</mobile:Form>


1 Answer

Chance Hopkins

3/25/2005 2:32:00 AM

0

NM. I got it working.

"Chance Hopkins" <chance_hopkins@hotmail.com> wrote in message
news:eExJp6mLFHA.3296@TK2MSFTNGP15.phx.gbl...
> No matter what I do, I can''t force a page to have a wml content-type (or
> any other type).
>
> It seems that the MobilePage controls this somewhere internally.
>
> Is there an override or property to control this?
>
> The code below returns:
> Content-Type: text/html; charset=utf-8
>
> unless I remove " Inherits="System.Web.UI.MobileControls.MobilePage" " and
> the form and control.
>
> Then it returns:
> Content-Type: text/vnd.wap.wml; charset=utf-8
>
> Id like to use the MobilePage class and force the content-type if
> possible.
>
> Any tips or clarity?
>
> -------------------------------------
>
> <%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB"
> %>
> <%
> Response.ContentType="text/vnd.wap.wml"
> Response.Write("<?xml version=""1.0"" encoding=""ISO-8859-1""?>")
> %>
> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
> "http://www.wapforum.org/DTD/wml_1.1.xml...
> <mobile:Form runat="server" ID="Form1" NAME="Form1">
> Hello, world!<br />
> <mobile:Label runat="server" Text="This is a label" ID="Label1"
> NAME="Label1" />
> </mobile:Form>
>
>