title: Passing selected value of dropdownlist in URL
body: <p>I have a dropdownlist that opens a new window when I select an item from the list. How can I pass a dropdownlist value to the new window in a URL?</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddlAdd" runat="server" CssClass="ddl" OnChange="javascript:openWindow('add.aspx?ddlAddValue=', 800, 885)"&gt;
      &lt;asp:ListItem&gt;One&lt;/asp:ListItem&gt;
      &lt;asp:ListItem&gt;Two&lt;/asp:ListItem&gt;
      &lt;asp:ListItem&gt;Three&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>This is the JavaScript function:</p>
  
  <pre><code>function openWindow(url, windowHeight, windowWidth)
  {
      var centerHeight = (screen.height - windowHeight) / 2;
      var centerWidth = (screen.width - windowWidth) / 2;
      var features = "height=" + windowHeight + ", width=" + windowWidth + ", top=" + centerHeight + ", left=" + centerWidth + ", scrollbars=" + 1;
      var popUp = window.open(url, "", features);
  }
  </code></pre>