我想在ASP.net中检测移动设备是否是平板电脑(iPad)
我看了51degrees项目,但是免费版本没有检测平板电脑的功能 – 而且由于我们将ASP.net解决方案分发给100个客户,我们无法为所有客户购买51degrees许可证.
我看了51degrees项目,但是免费版本没有检测平板电脑的功能 – 而且由于我们将ASP.net解决方案分发给100个客户,我们无法为所有客户购买51degrees许可证.
51degrees有免费或开源替代品吗?或者更新版本的MVC(4?)是否提供了比普通IsMobileDevice()更详细的信息?
谢谢,
康拉德
解决方法
您可以请求用户代理并检查它是否包含“ipad”
bool isIpad = Request.UserAgent.ToLower().Contains("ipad");
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。