Anybody has done this? Navigating to a web page and pop up the save as dialog? In this way, the browser can handle the file type, html, pdf, etc...
A:
Do you need to this to be when a FileHandler is called or on a static webpage?
If it is on a Handler page where the content type is returned then according the latest WatiN release documentation then you can do as follows:
using(IE ie = new IE(someUrlToGoTo)) { FileDownloadHandler fileDownloadHandler = new FileDownloadHandler(fullFileName); ie.AddDialogHandler(fileDownloadHandler);
ie.Link("startDownloadLinkId").Click();
fileDownloadHandler.WaitUntilFileDownloadDialogIsHandled(15); fileDownloadHandler.WaitUntilDownloadCompleted(200); }
Paul
PaulStack
2010-08-25 12:14:03
Thanks Paul but what i mean is that my application will force IE to show the Save As Dialog. The PDF is opened already in IE and I just want to save it.
Jojo
2010-09-01 10:15:23