title: Adding multiple DropDownLists with a button click
body: <p>Using a combination of ASP.NET (with C#) and jQuery, I'm try to create <code>DropDownList</code>s with a button.  These <code>DropDownList</code>s will be populated with a SQL query.  </p>
  
  <p>The part I'm having difficulty with is adding more than one using just the button click.  </p>
  
  <p>If the user clicks the button 5 times, 5 more <code>DropDownList</code>s should be created and populated with the same data.  Ideally, each <code>DropDownList</code> is contained in a new row of a table, or organized in a similar fashion.  </p>
  
  <p>I do not want to do any SQL connections in JavaScript.  Any advice with this?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I've tried using an <code>&lt;asp:PlaceHolder&gt;</code>, and then using that to add a <code>DropDownList</code>.  I could not figure out how to use this method and add more than one, though.:</p>
  
  <pre><code>&lt;asp:PlaceHolder ID="PlaceHolder1" runat="server"/&gt;
  
  protected void Add_Dropdownlist()
  {
     DropDownList DropDownList1 = new DropDownList();
     PlaceHolder1.Controls.Add(DropDownList1);
  }
  </code></pre>
  
  <p>I've tried using jQuery to copy the original <code>DropDownList</code>.  The problem I had, was that I couldn't figure out how to get the the original <code>DropDownList</code> from jQuery if it was an <code>&lt;asp:DropDownList&gt;</code>.  If I changed it to a <code>&lt;select&gt;</code> instead, I could not figure out how to populate it with SQL data from the ASP (server) side.</p>
  
  <pre><code>&lt;select id="DropDownList1"&gt;
    &lt;option value="-1"&gt;&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt;&lt;/asp:DropDownList&gt;
  
  function copy_Dropdownlist()
  {
    newDropdownlist = jQuey.extend({}, DropDownList2);
  }
  </code></pre>
  
  <p>In short, I've gone down several paths, but I don't think any of them are right.  I'm new to ASP.NET (google education) and I think the problems lies in linking the client side jQuery and the server side ASP.NET.  Thanks for the help.</p>