Mobile Screen Size

Discussion in 'ASP .Net Mobile' started by Alex Maghen, Jun 5, 2006.

  1. Alex Maghen

    Alex Maghen Guest

    Hi. Is there ANY kind of standard location in Request.ServerVariables (or
    anywhere else in the HTTP Header) where I can get the requesting phone's
    ScreenWidth and ScreenHeight? Is there *any* kind of standard in this?

    Alex
    Alex Maghen, Jun 5, 2006
    #1
    1. Advertising

  2. Hello Alex,

    Thank you for posting.

    As for Modile device's screenSize, do you mean the webbrowser's screen Size
    on the certain client device? Based on my experience, there won't have such
    http headers in normal http web requests. And as for web application,
    generally it will use the "UserAgent" http header to identify the
    client-side browser/device, and it will have a certain device list in the
    local database so that it can query out the certain device's capabilities
    information according that useragent http header value. The capabilities
    available depend on the local device setting database, in ASP.NET, it
    provide a device capabilities collection on the page request object, we can
    use it to query the info we want.

    #Mobile Device Capabilities
    http://msdn.microsoft.com/library/en-us/mwsdk/html/mworimobilecapabilities.a
    sp?frame=true

    For example, in ASP.NET Mobile page, we can use the following code to dump
    all the available capability items:

    =====================
    foreach (string key in Request.Browser.Capabilities.Keys)
    {
    Response.Write("<br/>" + key + ": " +
    Request.Browser.Capabilities[key]);
    }
    =====================

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Jun 6, 2006
    #2
    1. Advertising

  3. Hey Alex,

    How are you doing on this issue, does the information in my last reply
    helps you a little? Please feel free to post here if there is anything else
    we can help.

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Jun 8, 2006
    #3
    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. Zahoor
    Replies:
    1
    Views:
    790
    Darryl L. Pierce
    Nov 15, 2003
  2. Chameleon
    Replies:
    0
    Views:
    874
    Chameleon
    Dec 16, 2005
  3. Piet
    Replies:
    0
    Views:
    399
  4. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,517
    Michael Jung
    May 25, 2008
  5. chen selina
    Replies:
    0
    Views:
    1,244
    chen selina
    Jul 13, 2010
Loading...

Share This Page