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

154
Views
Ajax publica un 'linkId' al hacer clic en un enlace - (MVC) El controlador no es

Estaba tratando de PUBLICAR el 'Id' generado de los enlaces (que fueron generados por un para cada ciclo) cada vez que se hace clic en ellos. Puede ser que mi sintaxis Ajax tenga problemas. Busqué soluciones similares, pero no pude averiguar cómo pasar el valor de identificación mediante un método Ajax POST a un controlador MVC.

 function reply_click(clicked_id) { var obj = { Id = clicked_id } PostID(obj); } function PostID(obj) { $.ajax({ url: "/User/OnClickViewCounter", method: "POST", datatype: "json", data: obj, success: function(data) { alart(data); }, error: function(err) { console.error(log); } }); }
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <tbody> <tr> <td><a onclick="reply_click(this.id)" id="NoticeId" href="#" >NoticeName</a></td> <td>UploadTime</td> </tr> </tbody>

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!