title: Encrypt Route Data in URL
body: <p>In my ASP.NET MVC app, I want to encrypt the route data and NOT QueryString, in other word:</p>
  
  <p>I'm using the ASP.NET MVC default route pattern :</p>
  
  <pre><code>   routes.MapRoute(
               name: "Default",
              url: "{controller}/{action}/{id}",
               defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
               namespaces: new[] { "WHATEVER" }
           ); 
  </code></pre>
  
  <p>And I have Action Method take id Parameter:</p>
  
  <pre><code>  public ActionResult Example(int id)
    {
      return View();
    }
  </code></pre>
  
  <p>So My Url Now to pass the data to this Action Method is: </p>
  
  <p><strong>/Controller/Example/5</strong></p>
  
  <p>And I want it like this</p>
  
  <p><strong>/Controller/Example/ENCRYPTEDPARAMTER</strong></p>
  
  <p>Thanks in Advance</p>