title: How to pass input field value into route object?
body: <p>I have an input box where in the value entered will be POSTed to the Action parameter.
  But I also want the value to reflect on the url like this:</p>
  
  <p><code>www.my-site.com/search/myquery</code></p>
  
  <p>Any idea on how to achive this?</p>
  
  <p>Here are the codes..</p>
  
  <p>Search Form</p>
  
  <pre>
  <code>
  
          &lt;% using(Html.BeginForm("Index", "Search")) { %&gt;
  
              &lt;%: Html.TextBox("query", "Enter Keyword") %&gt;
  
          &lt;% } %&gt;
  </code>
  </pre>
  
  <p>Global Asax</p>
  
  <pre>
  <code>
  routes.Add("Search", new Route(
                  "Search/{query}",
                  new { controller = "Search", action ="Index", query="" }
              ));
  
  </code>
  </pre>
  
  <p>Controller</p>
  
  <pre>
  <code>
  
   public ActionResult Index(string query)
          {
  return new EmptyResult()
      }
  
  </code>
  </pre>