title: MVC3 URL Encoding?
body: <p>ASP.NET MVC3/Razor.</p>
  
  <p>I found that when I create an action link, say, like this:</p>
  
  <pre><code>@Html.ActionLink(product.Title, "Detail", "Products", new { id = product.ProductID }, null)
  </code></pre>
  
  <p>The MVC3 engine creates my product link. For example:</p>
  
  <pre><code>http://myhost/{ActionUrl}/PRODID
  </code></pre>
  
  <p>However, if my product ID was to contain any special character, it wouldn't be URL encoded.</p>
  
  <pre><code>http://myhost/{ActionUrl}/PROD/ID
  </code></pre>
  
  <p>Of course, this breaks my routing.
  My questions are:</p>
  
  <ol>
  <li>Should I expect it to automatically url encode values? Is there any way to set that up?</li>
  <li>If not, then what is the most cleaner way to encode and decode those? I really do not want to do that in every controller.</li>
  </ol>
  
  <p>Thanks!</p>