I'm sending user request from mvc view to the controller and controller after some processing send result as json object back to the view. my current solution working but I want to render html elements on the view side, not in the js function (as it is now).
function GetTabData(xdata) {
$.ajax({
url: ('/Home/GetData'),
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({ id: xdata }),
success: function (result) {
var data = null;
data = '<div class="list-products clearfix">
data += '<a href="/Home/MyData/' + item.Id + '">
....
}
so I want to remove all this divs and other html elements and send pure data and format this on the view, how can I do this?