Posts

JQUERY - INTERVIEW QUESTIONS AND ANSWERS

  Q1: What is jQuery and why is it used in  ASP.NET  Core? Answer:  jQuery is a fast, lightweight, and feature-rich JavaScript library that simplifies HTML document traversal, event handling, animating, and Ajax interactions. In  ASP.NET  Core, jQuery is commonly used for: Making AJAX calls to controllers DOM manipulation and validation Handling client-side events Enhancing UI interactions Example in  ASP.NET  Core: $ . ajax ( { type : "POST" , url : "/Employees/Create" , data : { name : "John" , salary : 50000 } , success : function ( response ) { $ ( "#result" ) . html ( "Employee added successfully" ) ; } } ) ; Q2: How do you include jQuery in an  ASP.NET  Core project? Answer:  There are multiple ways: Option 1: Using CDN (most common) < script src = " https://code.jquery.com/jquery-3.6.0.min.js " > </ script > Option 2: Using LibMan (Library Manager) // libman.json...