title: Get full request url, including parameters in controller
body: <p>How do I get the complete request URL (including query string) in my controller? Is it a matter of concatenating my URL and form parameters or is there a better way.</p>
  
  <p>I checked <a href="https://stackoverflow.com/questions/40680/how-do-i-get-the-full-url-of-the-page-i-am-on-in-c">this</a> question, but it seems not to be applicable to MVC.  </p>
  
  <p>Correct me if I'm wrong.</p>
  
  <p>Some more detailed information:</p>
  
  <p>My call to my <code>SearchController.AdvancedSearch()</code> originates from a form with about 15 optional parameters. Because of the number of parameters and no possible way (I think) to have optional parameters passed in a clean way, I went for a catchall string that is handled in the controller.</p>
  
  <p>Now I want my controller to store its call in a breadcrumb component so that when the crumb is clicked the exact same result can be fetched (with all, but not more, of the arguments included). To do this I need the entire request.URL, <em>including the querystring</em>.</p>
  
  <p>In <code>Request.RawURL</code>, <code>request.URL</code> etc this query string is not included. In fact currently I do a plain function.</p>
  
  <pre><code>String.Format("{0}/{1}", request.Url, request.form)
  </code></pre>
  
  <p>This gives me some weird results (like submit button values etc), but it works. If there are suggestions on how to make this less of an ugly hack, please do tell.</p>
  
  <p>I know where to find the current request, but I can't seem to find a raw URL anywhere though. They are all deprived from the querystring and I need that bit too.</p>
  
  <p>My controller updates a collection of URLs in my <code>BreadCrumb</code> component. Therefore it needs the request URL. How do you suggest I take on this problem?</p>