Avoiding the "File download" dialog when using the WebBrowser control to navigating to an excel fil

L

Luis Ferrao

Hi,

My Windows Forms application uses the WebBrowser control to
open an Excel file since OLE objects are gone in .Net. The application
is actualy a clone of the one found in the MS Knowledge Base Article
"How to Use the WebBrowser Control to Open Office Documents with
Visual C# .NET" which can be found here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;304662

The application does what it's supposed to (ie Loads embeded Excel
and opens the file), the problem is that prior to that it displays a
"File Download" dialog. For personal use i could simply uncheck the
"always ask before opening this type of file" checkbox but for the
the release this is not an option.

I would like to know if it is possible to avoid the "File Download"
dialog.

Thanks in advance for any help.

Luis Ferrao
 
G

Guest

To Avoid this you'll have to set the mime type of the stream for browser to "application/vnd.ms-excel"

HT
Sudhakar Sadasivun
Microsoft .NET MVP | MCA
http://weblogs.asp.net/ssadasivun
www.mugh.ne

----- Luis Ferrao wrote: ----

Hi

My Windows Forms application uses the WebBrowser control t
open an Excel file since OLE objects are gone in .Net. The applicatio
is actualy a clone of the one found in the MS Knowledge Base Articl
"How to Use the WebBrowser Control to Open Office Documents wit
Visual C# .NET" which can be found here
http://support.microsoft.com/default.aspx?scid=kb;EN-US;30466

The application does what it's supposed to (ie Loads embeded Exce
and opens the file), the problem is that prior to that it displays
"File Download" dialog. For personal use i could simply uncheck th
"always ask before opening this type of file" checkbox but for th
the release this is not an option

I would like to know if it is possible to avoid the "File Download
dialog

Thanks in advance for any help

Luis Ferra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top