Here's my code, I followed a tutorial but cannot figure out why it doesn' work
<form id="form1" runat = "server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:HoverMenuExtender ID="HoverMenuExtender1"
runat="server"
TargetCon开发者_如何学编程trolID = "OR"
PopupControlID = "PanelOR"
PopupPosition = "bottom"
OffsetX = "6"
PopDelay = "50"
HoverCssClass = "popupHover">
</asp:HoverMenuExtender>
<asp:Panel ID="PanelOR"
runat="server"
Height = "50px"
Width="200px"
CssClass="popupMenu">
<asp:LinkButton ID="Attribution" runat="server" CommandName="One" Text="Attribution"></asp:LinkButton><br />
<asp:LinkButton ID="Gestion" runat="server" Text="Gestion des OR"></asp:LinkButton>
</asp:Panel>
<asp:LinkButton ID="OR" runat="server">should happen here</asp:LinkButton>
</div>
</form>
On the css file
.popupMenu
{
visibility:hidden;
}
.popupHover
{
background-color:White;
}
Thanks in advance
You must make the panel to be displayed as none to be hovered
.popupMenu
{
display:none;
}
Update: I don't know why it doesn't work but here is the quick code i wrote and it just works out of the box.
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div>
<asp:Panel ID="Panel1" runat="server" CssClass="pnl">
<input type="button" value="button1" id="btn1" />
<input type="button" value="button2" id="btn2" />
</asp:Panel>
<asp:HoverMenuExtender ID="HoverMenuExtender1" runat="server" BehaviorID="hmeBehaviour"
PopupPosition="Bottom" TargetControlID="LinkButton1" PopupControlID="Panel1">
</asp:HoverMenuExtender>
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
</div>
</form>
</body>
.pnl
{
width:100px;
height:100px;
background-color:#CFCFCF;
border:1px solid #CECECE;
color:#CF0000;
}
when i hover over link button i get the two buttons below the link button.
Apparently I cannot use the toolkit with MVC 2
精彩评论