我怎样才能得到在 Safari 中工作?
在 safari 浏览器上,标准的
On the safari browser, the standard <asp:Menu> doesn't render well at all. How can this be fixed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
感谢您的建议,它引导我找到了以下解决方案;
我创建了一个名为“safari.browser”的文件并将其放置在 App_Browsers 目录中。 该文件的内容如下所示;
据我了解,这告诉 ASP.NET 不要使用通常用来呈现控件内容的适配器,而是使用上层呈现。
Thanks for the advice, it led me into the following solution;
I created a file named "safari.browser" and placed it in the App_Browsers directory. The content of this file is shown below;
As I understand it, this tells ASP.NET not to use the adaptor it would normally use to render the control content and instead use uplevel rendering.
您可以使用 ControlAdapter 来更改服务器控件的呈现。
这是一个例子:
http://www.pluralsight.com/ Community/blogs/fritz/archive/2007/03/27/46598.aspx
不过,在我看来,放弃菜单控件而采用纯 css 控件(在许多网站上都有)可能是等量的工作。
You can use ControlAdapters to alter the rendering of server controls.
Here's an example:
http://www.pluralsight.com/community/blogs/fritz/archive/2007/03/27/46598.aspx
Though, in my opinion it might be equal amount of work to abandon the menu control for a pure css one (available on many sites).
Oooof - 希望这将是一个在 web.config 中添加具有适当值或类似值的 browserCaps 项的简单情况...
Oooof - was hoping it would be a simmple case of adding a browserCaps item in web.config with appropriate values or similar...
我找到的解决此问题的最佳和最简单的解决方案是将这段代码包含在 page_load 事件中。
The best and simplest solution I've found for this problem is to include this bit of code in your page_load event.