title: Creating HTML from a DataTable using C#
body: <p>I need to be able to pass HTML data into Outlook like this:</p>
  
  <pre><code>MailMessage message = new MailMessage();
  message.Body = myBody;
  </code></pre>
  
  <p>Initially, I thought I could pass plain text to it and use <code>PadLeft</code> like this:</p>
  
  <pre><code>somestring.PadLeft(100);
  </code></pre>
  
  <p>but it did not align everything properly because even though <code>|||||</code> and <code>MMMMM</code> are both only 5 characters in length, they physically on the screen take up more space.</p>
  
  <p>My solution is to convert data that is in my datatable into an HTML table and then pass it into Outlook.</p>
  
  <ol>
  <li>how do I convert a datatable into an html table?</li>
  <li>is there a better solution to my issue?</li>
  </ol>