By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

Avoiding the "File download" dialog when using the WebBrowser control to navigating to an excel file (C#/Windows Forms)

P: n/a
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...b;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


Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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...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

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.