How can i detect if the request is coming from a mobile browser in my asp.net MVC 3

前端 未结 10 1943
旧时难觅i
旧时难觅i 2020-12-14 08:11

what i am trying to achieve is simple; Among all the view which i have in my web application, i have only two razor views that i have created a mobile version for them. so i

10条回答
  •  有刺的猬
    2020-12-14 09:07

    I use the 51degrees.mobi package from nuget. This is more accurate in detecting all the different mobile devices. It worked right away.

    When the browser is a mobile device, I redirect it to a different Area.

    I also recommend reading Steve Sandersons blog on the topic.

提交回复
热议问题