title: Passing JS variable to other controller in C# and put variable to input
body: <p>I dont know how to pass JS variable from HomeController Index.cshtml to EditController Create.cshtml (scaffolded) mayby someone can help me.</p>
  <p>My simple code in Index.cshtml</p>
  <pre><code>@Html.ActionLink(&quot;Pass variable to create&quot;, &quot;Create&quot;, &quot;Edit&quot;, new {}, null)
  &lt;script&gt;
      var JS_Name = 'Jessica';
      var JS_DateOfBirth = '25-09-2020'
  &lt;/script&gt;
  </code></pre>
  <p>I just want to Jessica was in the name field and 25-09-2020 in DateOfBirth field.</p>
  <p>I try with new{} but with no succes. In further project i will have a lot of variables to pass.</p>
  <p>Can someone give me the clue how to do it correctly?</p>
  <p><a href="https://i.stack.imgur.com/E6EvZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E6EvZ.png" alt="scafolded create" /></a></p>