In my previous post, I showed how to find whether the request came from Mobile or PC. But later my requirement is extended to find whether the request came from IPAD or not also. For this. We can use Request.UserAgent, If it has the word "ipad", it means request came from IPAD.
if (HttpContext.Current.Request.UserAgent.ToLower().Contains("ipad")) DeviceInfo = "IPAD";
Published under: Microsoft .NET Tips · · · ·
Be aware that this can be easily spoofed
https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/
Oh... Thank you for caution...
Do we have any other better alternative?
Yes we have,MobileESP code libraries,of course it's free!