ASP.NET MVC 3 的 GetOverriddenBrowser()
ASP.NET MVC 4 有一些不错的移动功能,这些功能正在取代我的突变移动视图引擎,但在它投入生产之前,我想为 ASP.NET MVC 3 实现浏览器覆盖功能。
SetOverriddenBrowser() 似乎设置了一个
.ASPXBrowserOverride
cookie,其中包含一个覆盖用户代理,该代理通过返回一个 HttpBrowserCapabilityBase
对象HttpContext.GetOverriddenBRowser()
。
为 MVC 3 实现此功能以利用移动检测库(包括 51Degrees.mobi)的最简单方法是什么?
ASP.NET MVC 4 has some nice mobile features which are replacing my mutant mobile view engines, but until it's production ready, I'd like to implement the browser override feature for ASP.NET MVC 3.
SetOverriddenBrowser()
seems to set a .ASPXBrowserOverride
cookie with an overriding User Agent that returns an HttpBrowserCapabilitiesBase
object via HttpContext.GetOverriddenBRowser()
.
What would be the simplest way of implementing this feature for MVC 3 to make use of the mobile detection library, including 51Degrees.mobi?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
51Degrees.mobi 网站上有一篇博客文章,您可能会觉得有用。请查看此处< /a>.它涵盖了使用 MVC 4 实现 51Degrees。
There is a blog post on the 51Degrees.mobi site that you might find useful. Check it out here. It covers the implementation of 51Degrees with MVC 4.