Today, I spent time on using AJAX HoverMenuExtender to display details for  Listview items.

I got problem when declare HoverMenu at design time, so I created them on Databound event.

So on the html page


<asp:HyperLink ID=”lblTitle” runat=”server”/>
                                                <asp:Panel CssClass=”detailsPanel” ID=”PopupPanel” runat=”server” style=”display:none;”>
                                                    <asp:Label ID=”lblHighlight” runat=”server” Text=”Label”></asp:Label>


So on the code behind databound method:

                HoverMenuExtender titleHme = new HoverMenuExtender();
                HyperLink titleLnk = e.Item.FindControl(“lblTitle”) as HyperLink;
                Label hightlightLabel = e.Item.FindControl(“lblHighlight”) as Label;

                    titleHme.PopupControlID = PopupPanel.ID;
                    titleHme.TargetControlID = titleLnk.ID;
                    titleHme.PopupPosition = HoverMenuPopupPosition.Right;
                    titleHme.ID = “hmeTitle”;
                    titleHme.OffsetX = 5;

Be careful Literal control cannot be used as Target control