var json = (your-json-object)
jQuery.ajax({
type: "POST",
url: "@Url.Action("your-action-metod")",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify(json),
failure: function (errMsg) {
alert(errMsg);
}
});
//Note: This javascript method has to be in the view file
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.