title: Add querystring to all anchor links in HTML body
body: <p>In C# given a string which contains HTML what is the best way to automatically add the query string data <code>test=1</code> to the end of every hyperlink?  It should only modify the url inside the <code>href</code> attribute for anchor links (eg not do it for image urls etc).</p>
  
  <p>An example would be:</p>
  
  <p><strong>Input</strong></p>
  
  <pre><code>&lt;a href="http://www.test.com"&gt;Visit http://www.test.com&lt;/a&gt; today
  and see what &lt;a href="http://www.test.com?p=1"&gt;deals&lt;/a&gt; we have.
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>&lt;a href="http://www.test.com?test=1"&gt;Visit http://www.test.com&lt;/a&gt; today
  and see what &lt;a href="http://www.test.com?p=1&amp;test=1"&gt;deals&lt;/a&gt; we have.
  </code></pre>
  
  <p>This seems to be a bit tricky and am not sure where the best place to start on this would be.  Any help appreciated!</p>