title: How to pass Request.QueryString to Url.Action?
body: <p>I'm building an url using the method:</p>
  
  <pre><code>Url.Action("action", "controller");
  </code></pre>
  
  <p>I like to pass the querystring for the current request into that url as well.
  Something like the following (but it doesn't work):</p>
  
  <pre><code>Url.Action("action", "controller", Request.QueryString);
  </code></pre>
  
  <p>Converting the QueryString to routevalues is possible with the following extension:</p>
  
  <pre><code>    public static RouteValueDictionary ToRouteValues(this NameValueCollection queryString)
      {
          if (queryString.IsNull() || queryString.HasKeys() == false) return new RouteValueDictionary();
  
          var routeValues = new RouteValueDictionary();
          foreach (string key in queryString.AllKeys)
              routeValues.Add(key, queryString[key]);
  
          return routeValues;
      }
  </code></pre>
  
  <p>With the extension method the following does work:</p>
  
  <pre><code>Url.Action("action", "controller", Request.QueryString.ToRouteValues());
  </code></pre>
  
  <p>Is there an other better way ?
  Thx</p>