对平板电脑禁用aspnet.friendlyurl的移动重定向 [英] Disable aspnet.friendlyurl's mobile redirect for tablets

查看:98
本文介绍了对平板电脑禁用aspnet.friendlyurl的移动重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站"使用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周后,仍然没有遮篷甚至没有评论?即使默认情况下它是在新的VS2013 Asp.Net项目中分发的,我也是唯一真正使用aspnet.FriendlyUrls的人吗?

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
-ViewSwitcher.cs
-ViewSwitcher.ascx.cs

ViewSwitcher
- ViewSwitcher.cs
- ViewSwitcher.ascx.cs

感谢@fortboise简化了我的回答

Thanks to @fortboise for simplifying my answer

这篇关于对平板电脑禁用aspnet.friendlyurl的移动重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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