[ToolboxData("<{0}:CustomDropdown runat="server"></{0}:CustomDropdown>")] public class CustomDropdown : CompositeControl { TextBox textBox; ImageButton button; CheckBoxList checkBox; Panel pnlForChkBox; HtmlGenericControl div = new HtmlGenericControl("div"); protected override void CreateChildControls() { Controls.Clear(); textBox = new TextBox(); textBox.ID = "txtbox"; button = new ImageButton(); button.ID = "btn"; button.ImageUrl = "~/images/CustomDropdown.png"; button.ImageAlign = ImageAlign.Middle; button.Click += new ImageClickEventHandler(button_Click); button.Height = Unit.Pixel(22); checkBox = new CheckBoxList(); checkBox.ID = "chkList"; pnlForChkBox = new Panel(); pnlForChkBox.ID = "pnlForChkbox"; pnlForChkBox.Controls.Add(checkBox); pnlForChkBox.Style.Add("border", "black 1px solid"); pnlForChkBox.Style.Add("overflow-y", "scroll"); pnlForChkBox.Style.Add("overflow-x", "x:hidden"); pnlForChkBox.Style.Add("width", "180px"); pnlForChkBox.Style.Add("Height", "180px"); pnlForChkBox.Visible = false; this.Controls.Add(textBox); this.Controls.Add(button); this.Controls.Add(pnlForChkBox); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)