views:

97

answers:

1

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
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