解决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
相关文档:
本文和大家分享的是.NET中窗体的飘动。希望对大家有所帮助吧。
用.NET制作飘动的窗体时,需要使用Timer控件。首先,当窗体加载时设定一个初始位置,然后在窗体中定义两个Timer控件,其中timer1用来控制窗体从左向右飘动,timer2控制窗体从右向左飘动,当timer1启动后,每隔0.01s,都会在触发的事件中给 ......
Asp.Net中几种相似的标记符号: < %=...%>< %#... %>< % %>< %@ %>解释及用法
答: < %#... %>: 是在绑定控件DataBind()方法执行时被执行,用于数据绑定
如: < %# Container.DataItem("tit") %>
< %= %>: 在程序执行时被调用,可以显示后台变量值
如:
*.aspx中: & ......
刚看到了一片文章 http://dotnet.csdn.net/page/a92a1213-9896-49c7-9c89-14ae5f0d87ae 提到如下几点:
1. 数据库连接超时
2. 创建的对象只管用,不管释放
3. 调试(Debug)模式下编译后,就用于应用环境中了
4. 实际作业模式分享
1,2,3比较好理解,我在做的时候犯了他说的 第三种错误,至 ......
本文目录:
1.membership简介
2.membership在sql server中的设置
3.配置web.config
4.创建用户CreateUserWizard控件
5.用户登录login控件
6.显示当前用户的名称LoginName控件
7.检测用户的身份验证状态的LoginStatus控件
8.为不同类别用户呈现不同内容的LoginView控件
9.更改密码的ChangePassword控件
10 ......
使用Gridview绑定数据库中的图片
注:此系列记录在我实际开发中遇到的问题和收藏一些技巧文章。
我们都知道,在Gridview中不能直接去绑定数据库中的图片,我们可以利用HttpHandler很容易的完成这个任务,在这里我记录一下这个过程。
1.上传图片存储到数据库中
在数据库中创建一个表,添加一下3个字段:
步骤一:在Web ......