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

142
Views
Cargando un modal en Razor

¿Hay alguna manera de hacer referencia a un archivo cshtml en un archivo javascript? Por ejemplo, tengo un Index.cshtml que muestra un modal para registrarse. Quiero hacer referencia a este modal en mi archivo javascript para mostrar cuando se carga la página.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede cargar el contenido de las vistas (o incluso las páginas de afeitar si las está sirviendo directamente) en un elemento (a menudo un div) usando jQuery como este:

 $("#yourdiv").load("@Href("~/Controller/Action"))

o

 $("#yourdiv").load("@Href("~/Path/to/file.cshtml"))

Esto cargará el contenido de la vista en el elemento DOM.

about 4 years ago · Juan Pablo Isaza Report
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!