How to use two server controls on one page?
<p>I have created a server control and calling it on a page two times.</p>

<p>below is the code</p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

namespace DNWebComponent {
    [DefaultProperty("Text")]
    [ToolboxData("&lt;{0}:DNdropdown runat=server&gt;&lt;/{0}:DNdropdown&gt;")]
    public class DNdropdown : WebControl, IDNComponent {

        private string _label;
        private TextBox _txtBox;
        public String _ConnectedField;
        private string _connectedField;
        private string _MultiSeekField;
        private List&lt;String&gt; _selectedValue;
        private string _InputTable;
        private CheckBoxList _Checkbox;
        Panel div;

        public String ConnectedField {
            get { return _connectedField; }
            set { _connectedField = value; }
        }
        public DNdropdown(string label)
            : this() {
            this._label = label;
        }
        public String Label {
            get { return _label; }
            set { _label = value; }
        }
        public DNdropdown() {
            _selectedValue = new List&lt;string&gt;();
            _txtBox = new TextBox();
            _Checkbox = new CheckBoxList();
            div = new Panel();
        }

        public String InputTable {
            get { return _InputTable; }
            set { _InputTable = value; }
        }
        public String MultiSeekField {
            get { return _MultiSeekField; }
            set { _MultiSeekField = value; }
        }
        public CheckBoxList AspChekcBoxes {
            get { return _Checkbox; }
            set { _Checkbox = value; }
        }
        public List&lt;String&gt; SelectedValue {

            get {
                foreach (ListItem item in _Checkbox.Items) {

                    if (item.Selected)
                        _selectedValue.Add(item.Value);
                }
                return _selectedValue;
            }
            set {
                if (value != null) {
                    _selectedValue = value;
                }
            }
        }
        public string DivCss { get; set; }

        protected List&lt;String&gt; GetPropertyValue&lt;v&gt;(string SelectedValue, List&lt;String&gt; nullValue) {
            if (ViewState[SelectedValue] == null) {
                return nullValue;
            }
            return (List&lt;String&gt;)ViewState[SelectedValue];
        }

        protected override void OnInit(EventArgs e) {
            div = new Panel { CssClass = DivCss };
            FillControl();
            div.Controls.Add(new Literal { Text = Label + ": " });
            Panel dvTxtBox = new Panel { CssClass = "dt" };
            _txtBox.Text = "Select";
            _txtBox.ReadOnly = true;
            dvTxtBox.Controls.Add(_txtBox);
            Panel dvChkBox = new Panel { CssClass = "divco" };
            dvTxtBox.Style.Add("float", "right;");
            dvTxtBox.Style.Add("margin-right", "700px;");
            dvChkBox.Style.Add("margin-right", "700px;");
            dvChkBox.Style.Add("float", "right;");
            dvChkBox.Controls.Add(_Checkbox);
            div.Controls.Add(dvTxtBox);
            div.Controls.Add(dvChkBox);
            Controls.Add(div);
        }
        protected override void RenderContents(HtmlTextWriter output) {
            div.RenderControl(output);
        }
        public bool FillControl() {
            _Checkbox.Items.Add("a");
            _Checkbox.Items.Add("b");
            return true;
        }

    }
}





     &lt;asp:PlaceHolder ID="Place1" runat="server"&gt;
            &lt;div id="DivDrop" runat="server"&gt;
            &lt;/div&gt;
            &lt;div id="divbtn"&gt;
           &lt;div&gt;&lt;cc:DNdropdown ID="dropNew" runat="server" Label="DropDown" /&gt;
           &lt;cc:DNdropdown  ID="newcontrol" runat="server"  Label="New Dropdown"/&gt;&lt;/div&gt;
            &lt;div &gt;&lt;asp:Button ID="btnSave" Text="Save" runat="server" OnClick="btnSave_Clicked" /&gt;&lt;/div&gt; &lt;/div&gt;


        &lt;/asp:PlaceHolder&gt;
</code></pre>

<p>I registered this conrol in a Sample.aspx page as above and I am using this control over there.dropNew control is working fine but whenever i add a newcontrol  to Sample.aspx page Problem starts.I click on one dropdown second one automatically opens</p>
