title: Pass a javascript variable as parameter to @url.Action()
body: <p>is it possible to pass a javascript variable as a parameter to @url.Action(), because as far as i know there may be server and client side issue, my requirement is i have to download the file according to filter, and ajax call doesnot work with downloading the file. so i have harcode the @url.Action() that works but can not able to implement this, can anyone suggest me how to pass the parameter to @url.Action() or any other approach.</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;a href="@Url.Action("Export", new { SelectedAccountType="1", FromDate = "2014-02-02", ToDate = "2014-02-02", SelectedAccount = "", SelectedUser = "", SelectedTeam = "" })" class="btn-primary" id="exportbutton2"&gt; Export as CSV&lt;/a&gt;
  </code></pre>
  
  <p>and this is the parameter i want to assign to @Url.Action</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var accountType = $('#SelectedAccountType').val();
          var fromDate = $('#FromDate').val();
          var toDate = $('#ToDate').val();
          var accountId = $('#SelectedAccount').val();
          var userId = $('#SelectedUser').val();
          var teamId = $('#SelectedTeam').val();
  &lt;/script&gt;
  </code></pre>