Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
Pasar la variable JS a otro controlador en C# y poner la variable en la entrada

No sé cómo pasar la variable JS de HomeController Index.cshtml a EditController Create.cshtml (con scaffolding), quizás alguien pueda ayudarme.

Mi código simple en Index.cshtml

 @Html.ActionLink("Pass variable to create", "Create", "Edit", new {}, null) <script> var JS_Name = 'Jessica'; var JS_DateOfBirth = '25-09-2020' </script>

Solo quiero que Jessica estuviera en el campo de nombre y 25-09-2020 en el campo Fecha de nacimiento.

Intento con new{} pero sin éxito. En un proyecto posterior tendré muchas variables para pasar.

Alguien me puede dar la pista de como hacerlo correctamente?

crear andamios

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!