skip to Main Content

ASP.NET Core Ajax returns null – Jquery ajax

function addTeam() { var teamName = $("teamField").val(); $.ajax({ type: "POST", url: 'AddTeam', contentType: "application/json;", data: { team: "HELLO PLEASE WORK" }, success: function () { alert("URA"); }, error: function (error) { alert(error); } }); }; [HttpPost] public JsonResult AddTeam(string team)…

VIEW QUESTION

how to pass JavaScript value to PHP page – Jquery ajax

It is showing undefined function in PHP page.And i made every possible way it is not working for me.Please guys help me with this. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <div id="myDiv">Welcome to stackoverflow</div> </body> <script> $(document).ready(function(){ var…

VIEW QUESTION
Back To Top
Search