Hi,
I have an aspx page where I need the user confirmation before closing the page using the following method :
<body onload="window.onbeforeunload = function() {window.event.returnValue = 'Are you sure?';}" >
In that page I also have a button to save a file on the client, that asp button has the following code :
Response.ContentType = "text/html";
Response.Output.Write("File contents!");
Response.AppendHeader("content-disposition", "attachment; filename=SavedFile.txt");
Response.End();
the problem is that the window close confirm box appears when I save my file. Is there another way I can Save the file to the client?
Thanks
...
Go to the complete details ...