Reputation: 1970
I am using ASP.NET MVC telerik control to post an AJAX call to reload a page. But i only want to partially load a div within a page. How can i do that?
$('#AddInventory').ajaxForm({
beforeSubmit: function () {
showWaitSlider("Please wait while uploading files. This may take a few moments.");
return true;
},
success: function (data) {
hideWaitSlider();
location.reload();
},
error: function (xhr, status, err) {
hideWaitSlider();
alert(xhr.responseText);
},
dataType: 'json'
});
Upvotes: 1
Views: 442
Reputation: 191819
data
in the success function should return the response HTML, which you can parse to get your div.
//location.reload();
$("#MyDiv").html($("#MyDiv", data).html);
Upvotes: 3