1
Hello,
I’m trying to take all the html of the page from the tag and send it to my controller, but I’m not getting it, follow code used.
function exportarExcel() {
var url = '@Url.Action("ExportExcel")';
var html = $("body").html();
$.ajax({
url: url,
data: {
Html: html,
},
});
}
Function in the Controller:
public void ExportExcel(string Html)
{
Classes.Export.ToExcelHtml(Response, Html.ToString());
}
It’s like this action of yours ?
– Marco Souza
I edited the post with the function
– Flavio