title: Inject a table in HTML Template to send an email c#
body: <p>I have an html template to send emails. How can i get the table tag and inject dynamically all rows?</p>
  
  <p><em>html template:</em></p>
  
  <pre><code>Hello {Username}!
  
  &lt;table class="tblCss"&gt;
   &lt;tr&gt;
    &lt;th&gt; Name &lt;/th&gt;
    &lt;th&gt; Age &lt;/th&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
  </code></pre>
  
  <p><em>cs file</em></p>
  
  <pre><code>string body = string.Empty;  
  using(StreamReader reader = new StreamReader("HtmlTemplate.html")))  
  {  
    body = reader.ReadToEnd();  
  }  
  
  body = body.Replace("{Username}", "test"); 
  </code></pre>