如何重定向到移动网页时,其手机或平板电脑? [英] How to redirect to mobile page when its mobile or tablet?
问题描述
我在我的网站上使用aspx页面。当用户在手机打开我的桌面网站我想去被重定向到我的移动网站。我使用C#。
I am using aspx pages in my website. when user open my Desktop Website in mobile I want to go be redirected to my Mobile Website. I am using C#.
推荐答案
您既可以检查的Request.Browser [IsMobileDevice] ==真正的
使用框架如下解释:
You can either check for Request.Browser["IsMobileDevice"] == "true"
using the framework as explained here:
http://msdn.microsoft。 COM / EN-US /库/ fhhycabe%28V = VS.90%29.aspx
或者你可以使用51Degrees.mobi这是如下所示:
Or you can use 51Degrees.mobi which is shown here:
一个好的作仪可以在这里找到:
A good comparission can be found here:
<一个href=\"http://dotnetslackers.com/articles/aspnet/Mobile-Device-Detection-and-Redirection-Using-ASP-NET.aspx\" rel=\"nofollow\">http://dotnetslackers.com/articles/aspnet/Mobile-Device-Detection-and-Redirection-Using-ASP-NET.aspx
这篇关于如何重定向到移动网页时,其手机或平板电脑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!