skip to Main Content

Passing multiple POST parameters in ASP.NET Core controller – Jquery ajax

I have the following controller method: [HttpPost] public IActionResult AddNewMessage(string recipientUserId, string message) { var currentLoggedInUserId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); _chatMessageRepository.AddNewMessage(currentLoggedInUserId, recipientUserId, message); return Ok(); } And I am trying to send data to it, using the following JQuery code: var data…

VIEW QUESTION

Use PHP file in Javascript – Jquery ajax

I have a PHP file contain some calculation. Now, I want to integrate the calculation into javascript in another file. How i can pass the variable in javascript to do calculation inside php? this is my javascript code: $("#upload").on("click", function(){…

VIEW QUESTION
Back To Top
Search