Mobile WebPage width RRS feed

  • Question

  • User-1398824828 posted

    I have creatred mobile application using mobile forms and controls.

    when i open the web page in mobile (iPhone) the page looks very small

    right now my

    Request.Browser.ScreenPixelsWidth = 640  and Request.Browser.ScreenPixelsHeight = 480

    i have also used below viewport still no use can someone help me to set auto width or set the width to 320


     <meta name="viewport" content="width=device-width; initial-scale=1.0;  user-scalable=0;"/>




    Wednesday, November 16, 2011 7:19 AM


All replies

  • User1918766559 posted

    You should use the following two meta-tags for i-Phone enabled webforms.


    <metaname=”viewport”content=”width=device-width; initial-scale=1.0″/>









    Wednesday, November 16, 2011 7:49 AM
  • User-1398824828 posted

    Still no use... below is my code


    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="~/msunl.aspx.vb" Inherits="msunl" %>

    <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">


    <meta name="apple-mobile-web-app-capable" content="yes" />

    <meta name="viewport" content="width=device-width; initial-scale=1.0" />



    <mobile:Form ID="Form1" Runat="server" PagerStyle-Wrapping="Wrap">

    <mobile:Panel ID="pnl1" Runat="Server" Alignment="Center">

    <mobile:Image Runat="server" ID="myImages" NavigateUrl="~/mobhome.aspx" BreakAfter="false"AlternateText="Tracking">


    <Choice Filter="isHTML32" ImageUrl="SunMob.jpg" />




    <br />

    <mobile:Label ID="Label6" Text="(C)2011 All rights reserved." Runat="server" ForeColor="gray" Font-Name="verdana" Font-Size="Small" Alignment="Center">







    Wednesday, November 16, 2011 7:59 AM
  • User1943143334 posted


    Since you are using Mobile controls, hence the problem! Actually Mobile controls are designed for WAP browsers and it is depreciated!

    Apple iPhone browser is capable of rendenring HTML 5 content!  So you can use general ASP.NET website and all the required META tags, that will be fine and solves your problem!

    Check the below links for more information on Mobile web deveopment!





    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 16, 2011 9:30 AM