locked
Mobile Form application becomes too small on some Mobile IE versions RRS feed

  • Question

  • User-569807576 posted

    We have a ADC.NET application that uses Windows Mobile Controls (System.Web.Mobile) VS 2008/ .NET 2.x and deployed on IIS 7. 

    On some devices the screen when viewed using IE is zoomed out. It is hard to read without zooming in. Most other devices the IE renders screen properly.

    Is there a way to control the "ViewPort" for Mobile Controls application?

    Tried using

    - meta ViewPort in various ways but has not effect.

    - Tried adding browser definition (http://msdn.microsoft.com/en-us/library/cc546461.aspx) but it did not help either

    If it helps the information on device (where problem occurs) is

             User-Agent  - Mozilla/4.0 (Compatible; MSIE 6.0; Windows NT 5.1; Windows Phone 6.5.3.5).

             UA-OS - Windows CE(Pocket PC V5.2);

              UA-Pixels - 480x640

    Application works properly on device (for example)

             User-Agent  - Mozilla/4.0 (Compatible; MSIE 6.0; Windows CE; IEMobile 7.11).

             UA-OS - Windows CE(Pocket PC V5.2);

              UA-Pixels - 240x320

    While it seems like Mobile Controls are no longer supported, we are in process of rewriting application not to use Mobile Controls but mean while users need application to work properly without microscope :)

    Any pointers on how it can addressed will be appreciated.

    Wednesday, September 21, 2011 12:04 PM

Answers

  • User-569807576 posted

    OK here is what that seems to work.

    Could not use "viewport" in heade. It gets dropped for reasons I do not fully understand.

    <head>
            <meta name="HandheldFriendly" content="true" />
            <meta name="viewport" content="width=device-width" />
    </head>

    But following discussion at http://forums.asp.net/t/1229706.aspx if we adding "DeviceSpecific" "ScriptTemplate" to body the display works properly.

    <body>
         <mobile:Form>
              <mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
                <Choice Filter="supportsJavaScript">
                        <ScriptTemplate>                                  
                        <meta name="HandheldFriendly" content="true" />
                        <meta name="viewport" content="width=device-width" />
                      </ScriptTemplate>
                </Choice>        
             </mobile:DeviceSpecific>
         <mobile:Form>
     </body>

    Note: I just used Filter ("supportsJavaScript") but it can be any thing else.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 23, 2011 3:23 PM

All replies

  • User1918766559 posted

    By default , all devices support the following tags well 

    <meta name="HandheldFriendly" content="true" /> 
    <meta name="viewport" content="width=device-width" />

    Some old WinCE devices & Windows Mobile devices cannot render properly , in that case configure .css files properly specifically for those devices.
    
    
    Thanks,
    Anindita
    http://anindita9.wordpress.com
    Thursday, September 22, 2011 5:10 AM
  • User-569807576 posted

    Thanks for reply.

    I already tried using meta tags (viewport and HandheldFriendly, it does not seem to make any difference. When looked at headers coming down from IIS Server (using WFetch) I notied that these meta tags does not make it to client. Not sure about why, There is no conditional logic in code (to render these meta-tags only in case of mobile devices).

    Friday, September 23, 2011 11:48 AM
  • User-569807576 posted

    OK here is what that seems to work.

    Could not use "viewport" in heade. It gets dropped for reasons I do not fully understand.

    <head>
            <meta name="HandheldFriendly" content="true" />
            <meta name="viewport" content="width=device-width" />
    </head>

    But following discussion at http://forums.asp.net/t/1229706.aspx if we adding "DeviceSpecific" "ScriptTemplate" to body the display works properly.

    <body>
         <mobile:Form>
              <mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
                <Choice Filter="supportsJavaScript">
                        <ScriptTemplate>                                  
                        <meta name="HandheldFriendly" content="true" />
                        <meta name="viewport" content="width=device-width" />
                      </ScriptTemplate>
                </Choice>        
             </mobile:DeviceSpecific>
         <mobile:Form>
     </body>

    Note: I just used Filter ("supportsJavaScript") but it can be any thing else.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 23, 2011 3:23 PM