title: How to properly change URL parameters?
body: <p>First let me explain what I mean by properly: I found many methods out there, but most of them will end up using string manipulations and things like that. I'd like to know if there is a simple way to do such using built in functions.</p>
  
  <p>So far I change the parameters of a <code>URL</code> with a <code>string myNewValue</code>:</p>
  
  <pre><code>Uri myUri = new Uri(URL);
  var qs = HttpUtility.ParseQueryString(myUri.Query);
  qs["ParameterName"] = myNewValue;
  </code></pre>
  
  <p>This does work pretty well. Now I'd like to get my <code>URL</code> back in a <code>string</code> with those new parameters. What is the proper way to do it? Something like getting the <code>URL</code> without patterns from my original string and merging the obtained parameters?</p>
  
  <p><strong>Note:</strong> So far I'm able to do it with <code>Substring</code> and such, I just find it "<strong>unclean</strong>" when one start to find chars in a string to <code>Substring</code> stuff from it.</p>
  
  <p>How I do is simple. From my original URL I substring up to the "<code>?</code>", then I combine with <code>qs.ToString()</code></p>