I have an asp.net mvc application. I am trying to update a partial view that is inside main view with ajax post. Here is my javascript code:
$.ajax({
url: "Interface/GetErrors?servers=" + serverNames,
type: "Post",
dataType: "html",
async: false,
success: function (result) {
$('#errorListDiv').html(result);
},
error: function () {
alert("Error occured");
}
});
Actually this ajax post gets partial view successfully. But my problem is; after partial view loads, some css classes, html attributes etc. loads incomplete. Because some parts of partial views are arranged and created with javascript functions. Because of this javascript libraries render in main view or viewstart and this libraries will not be rendered with ajax post, my partial view loads incomplete. How can I achieve this?
1)never useasync: false. Ever. Period.2)any queries, see item1)!successcallback.