为平板电脑禁用 aspnet.friendlyurl 的移动重定向 [英] Disable aspnet.friendlyurl's mobile redirect for tablets
问题描述
我的网站使用 Twitter Bootstrap 进行响应,桌面页面专为平板电脑和桌面设备设计.aspnet.friendlyUrls 将平板设备视为移动设备并将它们发送到.Mobile.aspx"等效项.如何禁用此行为并将平板电脑保留在桌面页面上?
My Website is responsive with Twitter Bootstrap and the desktop pages are designed for tablets and desktop. aspnet.friendlyUrls considers tablet devices as mobile and sends them to the ".Mobile.aspx" equivalent. How can I disable this behavior and keep tablets on the desktop pages?
2 周后,仍然没有 awnser 甚至评论?我是唯一一个实际使用 aspnet.FriendlyUrls 的人,即使它默认分布在新的 VS2013 Asp.Net 项目中?
2 Weeks later and still no awnser or even a comment? Am i the only one who actually uses aspnet.FriendlyUrls even if it's distributed in new VS2013 Asp.Net projects by default?
推荐答案
没有关闭此功能的设置,但您可以通过删除 Site.Mobile.Master 和 ViewSwitcher 文件来禁用此功能
There is no setting to turn this off, but you can disable this by deleting the Site.Mobile.Master and ViewSwitcher files
不再需要以下文件:
Site.Mobile.Master
- Site.Mobile.Master.cs
- Site.Mobile.Master.designer.cs
Site.Mobile.Master
- Site.Mobile.Master.cs
- Site.Mobile.Master.designer.cs
视图切换器
- ViewSwitcher.cs
- ViewSwitcher.ascx.cs
ViewSwitcher
- ViewSwitcher.cs
- ViewSwitcher.ascx.cs
感谢@fortboise 简化了我的回答
Thanks to @fortboise for simplifying my answer
这篇关于为平板电脑禁用 aspnet.friendlyurl 的移动重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!