asp:Menu hover makes "Security Information" pop up, how do I fix?
I hover over my menu and a submenu expands, then this bad boy comes accross the screen. Is there something I can do in my website to prevent this?
IE6
aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Templates/MyPage.master" AutoEventWireup="true"
CodeFile="Tasks.aspx.cs" Inherits="UI_MyPage_Tasks" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<table>
<tr valign="top">
开发者_StackOverflow中文版 <td>
<asp:Menu ID="menu1" runat="server" OnMenuItemClick="menu1_MenuItemClick" />
</td>
<td>
<cc:CustomUserControl ID="cuc1" runat="server" />
</td>
</tr>
</table>
aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VAC.Data;
public partial class UI_Patient_Tasks : BasePage
{
MyDB db = new MyDB();
private MenuItem UserRole1MenuItem { get { return GetMenu(Common.Role.UserRole1); } }
private MenuItem UserRole2MenuItem { get { return GetMenu(Common.Role.UserRole2); } }
private MenuItem GetMenu(string roleName)
{
int roleID = (from r in db.Roles where r.RoleName == roleName select r.RoleID).First();
MenuItem main = new MenuItem(roleName + " Menu");
foreach (CustomObject co in (from c in db.CustomObjects where c.RoleID == roleID orderby c.SortOrder select c))
main.ChildItems.Add(new MenuItem(co.Description, co.CustomObjectID.ToString()));
return main;
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
menu1.Items.Clear();
if (User.IsInRole(Common.Role.UserRole1))
menu1.Items.Add(UserRole1MenuItem);
if (User.IsInRole(Common.Role.UserRole2))
menu1.Items.Add(UserRole2MenuItem);
}
}
protected void menu1_MenuItemClick(object sender, MenuEventArgs e)
{
int id;
if (int.TryParse(e.Item.Value, out id))
{
cuc1.CustomObjectID = id;
}
}
}
</asp:Content>
It looks like you're serving your site over ssl (i.e. https://
) but serving some of the content, almost certainly something in the menu - such as an image over http://
, hence you're receiving the "mixed mode" warning.
Review the markup for your menu and look for any http://
URLs in the .aspx page (or possibly your codebehind if you build the menu dynamically) where there should be https://
or vice-versa.
Make sure all images or external resources are referenced via https.
Hooray I found a fix.
The problem is in the PopOut_Show function. MS does some weird child frame thing. I deleted it and it all works well!
精彩评论