lundi 2 mars 2015

How to prevent WebBrowser from opening a local PPTX in a new Window?

I want to use a WebBrowser-Control in a Winforms (.net / C#) application to show PPT and PPTX files. When I call Navigate() a download dialog appears (which is strange because its a local file).



webBrowser1.Navigate(fileName,false);


I also tried to canel the NewWindow - event but the Download-Dialog still shows up.


What am I missing?


Edit: The filename looks like this @"C:\Users\myuser\Desktop\test.pptx". I also tried @"http://fileC:\Users\myuser\Desktop\test.pptx".


Cheers!


Aucun commentaire:

Enregistrer un commentaire