易截截图软件、单文件、免安装、纯绿色、仅160KB

解决ASP.NET下的MENU控件在IE8中不显示的问题

原地址:http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx
ASP.NET Menu and IE8 rendering white issue
If you are using the ASP.NET Menu control, you might encounter under certain circumstances an issue where the menu appears as a white box in IE8 Standards Mode.
What IE8 is doing IS correct (by design), in the sense that in Standards mode IE8 is following the standards. Specifically, (element).currentStyle.zIndex returns "auto" in Standards mode when zindex has not been set. The ASP.NET Menu control assumes a different value.
I’d like to suggest a few possible workarounds to solve quickly the issue (note, you can use either one of them, depending on your scenario):
Overriding the z-index property
Using CSS Friendly Control Adapters
Adding the IE7 META tag to the website
1 – Overriding the z-index property
You can manually set the z-index property of the Menu items using the DynamicMenuStyle property of the asp:Menu control (note lines 9-14 and 20). Full source code is:
1: <head runat="server">
2: <title></title>
3: <style type="text/css">
4: body
5: {
6: background-color: Silver;
7: }
8: </style>
9: <style type="text/css">
10: .IE8Fix
11: {
12: z-index: 100;
13: }
14: </style>
15: </head>
16: <body>
17: <form id="form1" runat="server">
18: <div>
19: <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1">
20: <DynamicMenuStyle CssClass="IE8Fix" />
21: </asp:Menu>
22: <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
23: </div>
24: </form>
25: </body>
This solution is the least intrusive, but it require a page-by-page update (unless your


相关文档:

浅谈ASP.net安全编程

在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......

ASP.NET的实用代码

1. 打开新的窗口并传送参数:

传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryStrin ......

如何优化ASP.NET应用程序?

 刚看到了一片文章  http://dotnet.csdn.net/page/a92a1213-9896-49c7-9c89-14ae5f0d87ae    提到如下几点:
1. 数据库连接超时
2. 创建的对象只管用,不管释放
3. 调试(Debug)模式下编译后,就用于应用环境中了
4. 实际作业模式分享
1,2,3比较好理解,我在做的时候犯了他说的 第三种错误,至 ......

ASP.NET技巧:使用Gridview绑定数据库中的图片

使用Gridview绑定数据库中的图片
注:此系列记录在我实际开发中遇到的问题和收藏一些技巧文章。
我们都知道,在Gridview中不能直接去绑定数据库中的图片,我们可以利用HttpHandler很容易的完成这个任务,在这里我记录一下这个过程。
1.上传图片存储到数据库中
在数据库中创建一个表,添加一下3个字段:
步骤一:在Web ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号