Link to home
Create AccountLog in
Avatar of Abirami Rajendran
Abirami RajendranFlag for United States of America

asked on

asp.net IsMobileDevice returns false

Hello.I am trying to find the browsing device type and redirect user to different pages using the following code:
Dim mc As System.Web.Mobile.MobileCapabilities
        mc = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)

        If mc.IsMobileDevice Then
            Response.Redirect("mobile.aspx")
        Else
            Response.Redirect("default.aspx")
        End If
When browsed from phone, IsMobileDevice is returns unknown.  Is there any other wayto findout whether the device is mobile or PC?

ASKER CERTIFIED SOLUTION
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account