IsMobileDevice issue

Discussion in 'ASP .Net Mobile' started by Sumantra, Aug 24, 2006.

  1. Sumantra

    Sumantra Guest

    I have two application one web and another mobile. Now from the web i want to
    redirect those requests to the mobile application which are coming from the
    mobile device. But I have a mobile phone with Opera browser where HTML can be
    rendered. From there if I access the application it seems the IsMobileDevive
    property is returning false??? But for the WML phones IsMobileDevice is
    returning true.
    Why it is like that?
    Sumantra, Aug 24, 2006
    #1
    1. Advertising

  2. Sumantra

    sumithpdd Guest

    Its because of the changes to the mobile browser and this function
    doesnot check the http header properly. So be specific when you are
    checking for type of browser eg.
    {
    if (Request.Browser.Platform == "WinCE")
    {
    Response.Redirect("~/Mobile/default.aspx");
    }
    if (Request.Browser["IsMobileDevice"] == "true" )
    {
    Response.Redirect("~/Mobile/default.aspx");
    }
    else
    {
    Response.Redirect("~/Desktop/default.aspx");
    }
    }



    --
    sumithpdd
    ------------------------------------------------------------------------
    http://www.mcse.ms
    ------------------------------------------------------------------------
    View this thread: http://www.mcse.ms/message2512436.html
    sumithpdd, Oct 11, 2006
    #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. =?Utf-8?B?am9obmxjb3g=?=

    dell axim and IsMobileDevice

    =?Utf-8?B?am9obmxjb3g=?=, Jun 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    400
    bruce barker
    Jun 8, 2004
  2. Sacha Korell
    Replies:
    4
    Views:
    2,352
    Sacha Korell
    Dec 23, 2004
  3. Richard Jones

    IsMobileDevice and Pocket PC2003

    Richard Jones, Dec 3, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    125
    Richard Jones
    Dec 3, 2003
  4. Frederik Delacourt

    IsMobileDevice false on PocketPC 2003

    Frederik Delacourt, Feb 10, 2004, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    145
    Vladislav Tihonyuk
    Feb 11, 2004
  5. Arne

    isMobileDevice

    Arne, May 17, 2004, in forum: ASP .Net Mobile
    Replies:
    1
    Views:
    171
Loading...

Share This Page