title: Editing HTML and replacing certain texts inside it using c#
body: <p>In my C# WinForms program I want to generate a report as HTML. What I am doing now is using StringBuilder and TextWriter and write all html codes and save the file as HTML. It is working but I want to enhance the workflow.</p>
  
  <p>So my idea is having a HTML template with certain texts that are going to be replaced by a special tag or something (I have worked with Smarty template before, so I mean something like that).</p>
  
  <p>Imagine the HTML code below:</p>
  
  <pre><code>        &lt;tr&gt;
          &lt;td style="height: 80px; background-color:#F4FAFF"&gt;
          &lt;span class="testPropertiesTitle"&gt;Test Properties&lt;/span&gt;
          &lt;br /&gt;&lt;br /&gt;
          &lt;span class="headerComment"&gt;&lt;b&gt;Test Mode:&lt;/b&gt;&amp;nbsp;[TestMode]&lt;/span&gt;    
          &lt;br /&gt;&lt;br /&gt;    
          &lt;span class="headerComment"&gt;&lt;b&gt;Referenced DUT:&lt;/b&gt;&amp;nbsp;[RefDUT]&lt;/span&gt; 
          &lt;br /&gt;&lt;br /&gt;                        
          &lt;span class="headerComment"&gt;&lt;b&gt;Voltage Failure Limit:&lt;/b&gt;&amp;nbsp;[VoltageLimit]&lt;/span&gt;            
          &lt;br /&gt;&lt;br /&gt;
          &lt;span class="headerComment"&gt;&lt;b&gt;Current Failure Limit:&lt;/b&gt;&amp;nbsp;[CurrentLimit]&lt;/span&gt;
          &lt;br /&gt;&lt;br /&gt;
          &lt;span class="headerComment"&gt;&lt;b&gt;Test Mode:&lt;/b&gt;[TestMode]&amp;nbsp;&lt;/span&gt;                        
          &lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>
  
  <p>So basically what I want to do is replace a text between [] in the above html with certain strings that has been produced in my C# program.</p>
  
  <p>Any ideas, code snippets, links to tuturial and etc... will be appriciated!</p>