I dont know how to pass JS variable from HomeController Index.cshtml to EditController Create.cshtml (scaffolded) mayby someone can help me.
My simple code in Index.cshtml
@Html.ActionLink("Pass variable to create", "Create", "Edit", new {}, null)
<script>
var JS_Name = 'Jessica';
var JS_DateOfBirth = '25-09-2020'
</script>
I just want to Jessica was in the name field and 25-09-2020 in DateOfBirth field.
I try with new{} but with no succes. In further project i will have a lot of variables to pass.
Can someone give me the clue how to do it correctly?