Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现某些设备没有自动重定向到 .Mobile.cshtml 对应项。有没有办法通过 HttpContext.GetOverriddenBrowser 方法解决这个问题或根据屏幕分辨率强制移动?
你可以尝试添加一小段 Javascript 来创建一个带有 Javascript 的 cookie
window.screen.availHeight window.screen.availWidth
然后在服务器端检查 _PageStart.cshtml 中的 cookie(在返回每个页面之前运行),如果它满足您的要求,请使用
HttpContext.SetOverriddenBrowser(BrowserOverride.Mobile)
我试图在表格中的一个元素中包含一个链接。
当我在没有它的情况下进行链接时,它可以正常工作,但是当我想将它作为表格的一部分包含时,它就不起作用了。
这行代码有效:
for(int i=0;i<tableWeb.size()