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

If the son is yes then the dropdown from list 1 should come if the son dropdown is no then the drop down from list 2 must come – Jquery ajax

I am setting up a conditional dropdown. <div class="form-group"> <label asp-for="son" class="control-label"></label> <select name="son" id="son"> <option value="none" class="a" selected="selected"> -- choose one --</option> <option>Yes</option> <option>No</option> </select> <span asp-validation-for="son" class="text-danger"></span> </div> Here is the dropdown for son, if it is NO…

VIEW QUESTION
Back To Top
Search