locked
IsMobile not determining mobile! RRS feed

  • Question

  • User969992919 posted

    I am using this code to determine if the device is mobile:

    <asp:TableRow>
        <asp:TableCell VerticalAlign="Top">is Mobile</asp:TableCell>
        <asp:TableCell VerticalAlign="Top">:</asp:TableCell>
        <asp:TableCell VerticalAlign="Top"><% Response.Write(Request.Browser.IsMobileDevice); %></asp:TableCell>
    </asp:TableRow>
    


    but I always get IsMobile = False when using my Samsung Galaxy SII or S3!

    why is that? can you try it here from mobile and let me know if you'll get IsMobile = True?



    Friday, October 26, 2012 2:41 PM

Answers

  • User1943143334 posted

    Hi,

    Request.Browser.IsMobileDevice will not work properly, since browser definition files are not available for the latest devices!

    You may have to try with UserAgent string!

    http://detectmobilebrowsers.com/

    Hope it helps u...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, October 28, 2012 12:31 PM