title: How to get the parameter from a relative URL string in C#?
body: <p>What's the most efficient way to get a specific parameter from a relative URL string using C#?</p>
  
  <p>For example, how would you get the value of the <code>ACTION</code> parameter from the following relative URL string:</p>
  
  <pre><code>string url = "/page/example?ACTION=data&amp;FOO=test";
  </code></pre>
  
  <p>I have already tried using:</p>
  
  <pre><code>var myUri = new Uri(url, UriKind.Relative);
  String action = HttpUtility.ParseQueryString(myUri.Query).Get("ACTION");
  </code></pre>
  
  <p>However, I get the following error: </p>
  
  <blockquote>
    <p>This operation is not supported for a relative URI.</p>
  </blockquote>