locked
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

    <head> 

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

    </head> 

     

     

    Wednesday, November 16, 2011 7:19 AM

Answers

All replies

  • User1918766559 posted

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

    <metaname=”apple-mobile-web-app-capable”content=”yes”/>

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

     

     

     

    Thanks,

    Anindita

    http://anindita9.wordpress.com

     

     

    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">

    <head>

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

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

    </head>

    <body>

    <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">

    <DeviceSpecific>

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

    </DeviceSpecific>

    </mobile:Image>

    </mobile:Panel>

    <br />

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

    </mobile:Label>

    </mobile:Form>&nbsp;

    </body>

    </html>

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

     

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

    Hi,

    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!

    http://roopeshreddy.wordpress.com/2010/07/25/mobile-development-in-asp-net/

    http://roopeshreddy.wordpress.com/2011/03/05/guidelines-for-developing-web-apps-for-apple-iphone/

    http://roopeshreddy.wordpress.com/2011/10/11/apple-iphoneipad-simulator/

     

    Hope it helps u...

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