"YourControllerName/ActionName"Example:-
$.post("Home/CreatePerson", { name: "John", time: "2pm" },This will work great until you deploy your project in IIS with an alias to your web application. Let say the give alias is "MyWeb". The the URL will be -your-iis-server-ip/MyWeb. But the Jquery post in above will post its data to a URL something like -your-iis-server-ip/Home/CreatePerson
function(data) {
alert(data);
});
To avoid this you need to create post URL dynamically using @Url.Action() helper. Here is the corrected JQuery post.
$.post("@Url.Action("CreatePerson", "Home")", { name: "John", time: "2pm" },
function(data) {
alert(data);
});