title: Set width and height of ASP.NET (4.0) listbox to fit the items
body: <p>I have a listbox on a page that is bound to a linqdatasource.
  In the ondatabound event I am trying to make the size of the listbox on screen fit the items, to avoid having to scroll and to avoid excessive white space.</p>
  
  <p>How can I do this?</p>
  
  <pre><code>protected void ListBox1_DataBound(object sender, EventArgs e)
  {
    ListBox1.FitToItems();
  }
  protected void FitToItems() {
    ...?
  }
  </code></pre>