title: Pass a Model property as a parameter to an Url.Action
body: <p>I'm developing an ASP.NET MVC 5 app with C# and .NET Framework 4.7.</p>
  
  <p>I'm having troubles trying to pass parameters with <code>Url.Action</code>. When I use this:</p>
  
  <pre><code>&lt;input type="button" value="@Resources.ProductCreateOmitCaption" 
      onclick='location.href=&lt;%: Url.Action("Index", "ProductionOrder", new { isWizard = @Model.IsWizard}) %&gt;' /&gt;
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>&lt;input type="button" value="Continue" 
      onclick='location.href=&lt;%: Url.Action("Index", "ProductionOrder", new { isWizard =}) %&gt;' /&gt;
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>&lt;input type="button" value="@Resources.ProductCreateOmitCaption" 
      onclick="location.href='&lt;%: Url.Action("Index", "ProductionOrder", new { isWizard = @Model.IsWizard}) %&gt;'" /&gt;
  </code></pre>
  
  <p>With this another result:</p>
  
  <pre><code>&lt;input type="button" value="Continue" 
      onclick="location.href='&lt;%: Url.Action("Index", "ProductionOrder", new { isWizard = False}) %&gt;'" /&gt;
  </code></pre>
  
  <p>With the error:</p>
  
  <blockquote>
    <p>JavaScript critical error at line 177, column 60 in
    <a href="http://AnotherPC:53827/Products/Create" rel="nofollow noreferrer">http://AnotherPC:53827/Products/Create</a>\n\nSCRIPT1015: Unfinished
    string constant</p>
  </blockquote>
  
  <p>How can I do it?</p>
  
  <p>By the way I'm using Razor.</p>