title: MVC3 Url.Action querystring generation
body: <p>I am trying to generate an url for an MVC 3 action within javascript environment (in a cshtml file). </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    ...
    var src = "@Url.Action("GetProductImage", new { productId = Model.Product.Id, pos = 1, size = 0 })";
    $(document.createElement("img")).attr("src", src);
    ...
  &lt;/script&gt;
  </code></pre>
  
  <p>Now this works almost fine, my problem is that the querystring is being escaped.
  Instead of:</p>
  
  <pre><code>"/Products/GetProductImage?productId=1&amp;pos=0&amp;size=0"
  </code></pre>
  
  <p>it generates:</p>
  
  <pre><code>"/Products/GetProductImage?productId=1&amp;amp;pos=0&amp;amp;size=0"
  </code></pre>
  
  <p>so my action does not get called.</p>
  
  <p>Now I know I can make my own custom Url helper function, but I was wondering if I can use this or some other built in helper to get the unescaped URL?</p>
  
  <p>Thanks in advance, G.</p>