Skip to content

Instantly share code, notes, and snippets.

@brian-lim-42
Created July 13, 2015 22:24
Show Gist options
  • Save brian-lim-42/3677fec5d16765557147 to your computer and use it in GitHub Desktop.
Save brian-lim-42/3677fec5d16765557147 to your computer and use it in GitHub Desktop.
var obj = {};
obj.TestString = "Test";
obj.TestInt = 1;
obj.TestBool = true;
$.ajax({
type: 'POST',
url: '@Url.Action("Test", "Test")', // replace this with the name of the controller and model
data: JSON.stringify(obj),
dataType: "html",
success: function (html) {
alert('success');
$('#div').html(html);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment