Jul 05, 2017, 6:23 AM
[CLOSED] Export Button in a Window
Hi,
I have a [Export to Excel] button in a window.
Can you help me on this?
Thank you.
I have a [Export to Excel] button in a window.
protected void ExportToExcel(object sender, DirectEventArgs e)
{
MemoryStream stream = new MemoryStream();
wb.SaveAs(stream);
stream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment; filename=" + myName);
Response.ContentType = "application/vnd.ms-excel";
Response.BinaryWrite(stream.ToArray());
Response.End();
}
When I click on the Export button, it throws an exception "{success:false,message:"Blocked a frame with origin "https://xxx.com" from accessing a cross-origin frame."}" using Chrome. IE is working fine.Can you help me on this?
Thank you.
Last edited by fabricio.murta; Sep 22, 2017 at 10:18 PM.
Reason: no feedback from the user in 7+ days