locked
How to check the user access the website using a mobile device in asp.net RRS feed

  • Question

  • User-978244421 posted

    Hi guys!

    I want to build custom interfaces for mobile devices, But do not know how tocheck the users to use mobile devices to access my website. I used the language C#. Please please help me

    Thanks

    Monday, September 15, 2014 9:25 PM

All replies

  • User2103319870 posted

    But do not know how tocheck the users to use mobile devices to access my website. I used the language C#. 

    You can try using the IsMobileDevice Property to identify the browser is Mobile Browser or not.

    Sample Code:

    protected void Page_Load(object sender, EventArgs e)
    {
        //Check if browser is Mobile Browser or not
        if (Request.Browser.IsMobileDevice)
        {
                   
        }
    }

    Another option is to use the 51Degrees.Mobi package tool to verify the request are coming from mobile or desktop.

    You can refer the below link for more details

    Monday, September 15, 2014 10:39 PM