Hello,
I'm trying to get all the page html from the tag and send it to my controller, but I'm not getting it, it follows used code.
function exportarExcel() {
var url = '@Url.Action("ExportExcel")';
var html = $("body").html();
$.ajax({
url: url,
data: {
Html: html,
},
});
}
Function on Controller:
public void ExportExcel(string Html)
{
Classes.Export.ToExcelHtml(Response, Html.ToString());
}