Content-Type of MobilePage

Discussion in 'ASP .Net Mobile' started by Chance Hopkins, Mar 21, 2005.

  1. 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>
    Chance Hopkins, Mar 21, 2005
    #1
    1. Advertising

  2. NM. I got it working.

    "Chance Hopkins" <> wrote in message
    news:...
    > 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>
    >
    >
    Chance Hopkins, Mar 25, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MobilePage and Inheritance

    , Jan 4, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    340
  2. SoSimple
    Replies:
    1
    Views:
    111
    JuanDG
    Sep 21, 2004
  3. George Durzi

    MobilePage / Page Title

    George Durzi, Nov 17, 2004, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    121
    JuanDG
    Nov 19, 2004
  4. empires2
    Replies:
    0
    Views:
    141
    empires2
    Jan 26, 2005
  5. jwill_mis
    Replies:
    0
    Views:
    837
    jwill_mis
    Mar 25, 2008
Loading...

Share This Page