Request.Browser.IsMobileDevice = FALSE为Android,为什么呢? [英] Request.Browser.IsMobileDevice = false for Android, why?

查看:173
本文介绍了Request.Browser.IsMobileDevice = FALSE为Android,为什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三星Galaxy S2,在C#code这表明Request.Browser.IsMobileDevice =假的,但我想用移动版本我的应用程序。如何有能力展示手机版我的网站,Android设备?

I have samsung galaxy s2, in C# code it shows Request.Browser.IsMobileDevice = false, but I want to use mobile version for my application. How to have ability to show mobile version of my website, for Android devices?

感谢您,这么多。

谢尔盖。

推荐答案

您可以查看 用户代理 的HTTP标头。

You can check the User-Agent HTTP header.

用户代理是,(通常)包含平台的浏览器名称和版本,以及名称和版本或OS运行浏览器上的标识符。目前的标准是有这种分割成空格分隔元素,但在现实中的用户代理字段可以设置任何东西。

The user-agent is an identifier that (usually) contains the browser name and version, as well as the name and version of the platform or OS the browser is running on. The current standard is to have this split into space-separated elements, but in reality the User-Agent field can be set to anything.

例如:

Mozilla/5.0 Windows NT 6.1 WOW64 rv 8.0 Gecko/20100101 Firefox/8.0

这表明,我跑的Firefox 8.0(使用Mozilla的渲染器V5.0和Geck​​o排版引擎发布2010/01/01)的Windows NT 6.1发布64位版本(这是Windows 7中)。

This shows that I'm running Firefox 8.0 (which uses Mozilla renderer v5.0 and Gecko layout engine release 2010/01/01) on a 64-bit version of Windows NT 6.1 Release (which is Windows 7).

您可以获取有关从这里用户代理字符串的详细信息: http://www.useragentstring.com/

You can get more info about user agent strings from here: http://www.useragentstring.com/

这篇关于Request.Browser.IsMobileDevice = FALSE为Android,为什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆