如何知道是否asp.net网站从移动设备或从系统/笔记本/计算机(在Windows,Mac等)访问 [英] How to know if the asp.net site is accessed from a mobile device or from a system/laptop/machine(windows,mac etc)

查看:152
本文介绍了如何知道是否asp.net网站从移动设备或从系统/笔记本/计算机(在Windows,Mac等)访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发使用asp.net web开发2010年,我想,如果该网站是从手机浏览器访问重定向到不同的网页网站。而且,对于Windows / Mac的/ Linux的用户等等不同的功能。

I have developed a website using asp.net web developer 2010. I would like to redirect to different page if the site is accessed from mobile browser. And, different functionality for windows/mac/linux etc users.

我怎样才能做到这一点?

How can I do this?

我提到在一些论坛上一些帖子,它是说我需要依赖于第三方库。

I referred some posts in some forums, and it is said that I need to depend on third party libraries.

我如何能实现这一点没有任何第三方库?

How could I implement this without any third party libraries?

中的任何一个,请帮助我。

Any one Please help me out.

任何帮助是AP preciated。谢谢!

Any help is appreciated. Thanks!!

推荐答案

在的Request.Browser对象属性可能的地方是,这些都可能对你有用的所有选项:

The Request.Browser object properties are probably where it is at, these are all options that may be useful to you:

Request.Browser.IsMobileDevice
Request.Browser.MobileDeviceManufacturer
Request.Browser.MobileDeviceModel
Request.Browser.ScreenPixelsWidth
Request.Browser.SupportsXmlHttp

有没有你想避免一个第三方组件的理由?

Was there a reason you wanted to avoid a 3rd party component?

我们目前使用通过51Degrees.mobi一个WURFL设备数据库 - 它的作品真的很好。

We currently use a WURFL device database via 51Degrees.mobi - which works really well.

这篇关于如何知道是否asp.net网站从移动设备或从系统/笔记本/计算机(在Windows,Mac等)访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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