title: Variable parameters not accepting in @Url.ACtion()
body: <p>I am Passing two variable parameters in <code>@Url.Action()</code>. But its not accepting the variable parameters but accepting constant values. My code is like this</p>
  
  <pre><code>$(document).ready(function () {
      $(".print").click(function () {
          var id = $(#id).val();
          var dept = $(#dept ).val();
          var url = "@Html.Raw(@Url.Action("ActionResultname", "ControllerName", new {sid= id , sdept=dept }))";
          window.location.href = url;
      });
  });
  </code></pre>
  
  <p>here <code>id</code> &amp; <code>sid</code> is not accepting as a value , its taking as string . But if i pass like</p>
  
  <pre><code>var url = "@Html.Raw(@Url.Action("ActionResultname", "ControllerName", new {sid= 10, sdept=30}))";
  </code></pre>
  
  <p>Its accepting correctly as <code>sid=10</code> &amp; <code>sdept=30</code>. Please help me how to pass a variable to the parameter.</p>