WebBrowser Control: Suppressing File Download Dialog
-
I am using a webbrowser control to load and show supported documents within it. for file types that it cannot embed, i want to automatically launch the application that is associated with that file and open it there. How can I solve the following problems 1. When I enter the following code line myWebBrowser.Navigate("C:\myFile.xls") How do i avoid the download dialog from popping up? 2. How can i tell if my webbrowser will not be able to embed this application but will be able to embed that one? 3. In which event of the WebBrowser control do i need to do this? Thanks for your assistance.
-
I am using a webbrowser control to load and show supported documents within it. for file types that it cannot embed, i want to automatically launch the application that is associated with that file and open it there. How can I solve the following problems 1. When I enter the following code line myWebBrowser.Navigate("C:\myFile.xls") How do i avoid the download dialog from popping up? 2. How can i tell if my webbrowser will not be able to embed this application but will be able to embed that one? 3. In which event of the WebBrowser control do i need to do this? Thanks for your assistance.
I don't think you can. It is for security reasons since the user should be aware of the nature and type of files coming into his system.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
I don't think you can. It is for security reasons since the user should be aware of the nature and type of files coming into his system.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis LevinsonThanks for your reply. Ok, or maybe how do I cancel the download completely wen it is about to happen and initiate another process. Note I jus wanna cancel the download if it is going to make that download diolog box pop up otherwise if the browser can embed the document, i want it to continue.