Monday, 22 January 2018

Detect a Mobile device in ASP.Net




Image result for mobile and pc



Spent some time the other day trying to sort out in AP.Net how to detect a Mobile as apposed to a desktop.
There where lots of code about that went about it a lot of different ways that I thought where a bit long winded then I saw this is my trawling and it works a treat.

 Dim mobile As Boolean
        With Request.Browser

            mobile = .IsMobileDevice

        End With


Mobile being true or false neat and simple.

No comments:

Post a Comment

Multi Point USB Charger

  USB Plug Charger, 4-Port USB Fast Charger Plug with 33W Intelligent Quick Charge 3.0 Wall Charger, Multi USBPower Adapter UK Fast Charging...