can you clarify a little bit how returning raw data from a partial view works in practice?
@Html.Partial("_MyPartialView") returns always the raw data so that I can see the HTML in the page source.
But if I'm trying to do the same via JQuery AJAX call I cannot see the HTML anymore in the page source
$.ajax({
url: '@Url.Action("GetData", "Home")',
data: { Period: period, FromDate: fromDate, ToDate: toDate },
type: 'GET',
success: function (data) {
$("#someDiv").html(data);
}
});
Both examples work but the difference is that I cannot see the HTML output anymore via AJAX. Is this by design and does it really matter? Or can I generate visible HTML in the output via AJAX?