title: Format a string into columns
body: <p>Is there a cool way to take something like this:</p>
  
  <pre>Customer Name - City, State - ID
  Bob Whiley - Howesville, TN - 322
  Marley Winchester - Old Towne, CA - 5653
  </pre>
  
  <p>and format it to something like this:</p>
  
  <pre>Customer Name     - City,       State - ID
  Bob Whiley        - Howesville, TN    - 322
  Marley Winchester - Old Towne,  CA    - 5653
  </pre>
  
  <p>Using string format commands?</p>
  
  <p>I am not too hung up on what to do if one is very long.  For example this would be ok by me:</p>
  
  <pre>Customer Name     - City,       State - ID
  Bob Whiley        - Howesville, TN    - 322
  Marley Winchester - Old Towne,  CA    - 5653
  Super Town person - Long Town Name, WA- 45648 
  </pre>
  
  <p>To provide some context.  I have a drop down box that shows info very similar to this.  Right now my code to create the item in the drop down looks like this:</p>
  
  <pre><code>public partial class CustomerDataContract
  {
      public string DropDownDisplay
      {
          get
          {
               return  Name + " - " + City + ",  " + State + " - " + ID;
          }
      }
  }
  </code></pre>
  
  <p>I am looking for a way to format this better.  Any ideas?</p>
  
  <hr>
  
  <p>This is what I ended up with:</p>
  
  <pre><code>HttpContext.Current.Server.HtmlDecode(
      String.Format("{0,-27} - {1,-15}, {2, 2} - {3,5}", 
      Name, City, State, ID)
      .Replace(" ", "&amp;nbsp;"));
  </code></pre>
  
  <p>The HtmlDecode changes the &nbsp; to a space that can withstand the space removing formatting of the dropdown list.</p>