Content-Type of MobilePage

C

Chance Hopkins

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top