Sunday, March 11, 2012

DropDown Extender

Hi Akjha,

Based on your description, I have made a sample here. Please compare it with yours. I have tested on IE7 & Firefox 2.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Page_Load(object sender, EventArgs e) { LinkButton myLinkButton = new LinkButton(); myLinkButton.ID = "myLB"; myLinkButton.Text ="Hello, how are you?"; this.form1.Controls.Add(myLinkButton); DDE.TargetControlID = "myLB"; }</script><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style> .DropDownList { border-bottom:dotted 1px #006699; cursor:pointer; color:Maroon } </style></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Panel ID="DropPanel" runat="server" CssClass="ContextMenuPanel" Style="display: none; visibility: hidden; height:40px; width:120px;overflow:auto;"> <li class="DropDownList">11111</li> <li class="DropDownList">22222</li> <li class="DropDownList">33333</li> <li class="DropDownList">44444</li> <li class="DropDownList">55555</li> </asp:Panel> <ajaxToolkit:DropDownExtender runat="server" ID="DDE" DropDownControlID="DropPanel" /> </form></body></html>

Best regards,

Jonathan

No comments:

Post a Comment