HighTechTalks DotNet Forums  

Content-Type of MobilePage

ASP.net Mobile microsoft.public.dotnet.framework.aspnet.mobile


Discuss Content-Type of MobilePage in the ASP.net Mobile forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Chance Hopkins
 
Posts: n/a

Default Content-Type of MobilePage - 03-21-2005 , 06:37 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>



Reply With Quote
  #2  
Old   
Chance Hopkins
 
Posts: n/a

Default Re: Content-Type of MobilePage - 03-24-2005 , 09:31 PM






NM. I got it working.

"Chance Hopkins" <chance_hopkins (AT) hotmail (DOT) com> wrote

Quote:
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





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.