473,396 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
1 6395
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bhavin | last post by:
I m using webbrowser control in my C# app. My system has IE 6.0. The application is crashing on other machine which has IE 5.0. Any idea why? Any kind of help will be a gr8 favor...
0
by: Luis | last post by:
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...
2
by: E Stafford | last post by:
I am creating a form app that uses a webBrowser control and allows users to interact with a web hosted application. Users can query the web app and generate a CSV file that they should be able to...
2
by: programmer2004 | last post by:
Hi I have used WebBrowser control and i want to save the entire webpage including pictures etc. i have called ExecWB method of WebBrowser control with OLECMDEXECOPT_DONTPROMPTUSER flag, but it...
1
by: Sameer | last post by:
Hi I have a windows form application and am using WebBrowser control to display a PDF document. The problem is that it will display the PDF file just fine however, when i try to delete the file...
1
by: JP2006 | last post by:
I'm trying to write a control that will take a screen capture of a particular website when a user submits a form in a web application; one of the form fields is for a URL - the control needs to get...
6
by: Leon | last post by:
Hi there, I am trying to use the WebBrowser Control in a form which is being started in an own thread by the main form of my application. Unfortunately I am always getting an error in...
2
by: Artie | last post by:
Hi, I have a WebBrowser control displaying some formatted HTML. I need to be able to save the formatted HTML to a file, using the common Windows 'Save As' dialog, and preferably be able to...
0
by: mahendravarma | last post by:
HI, For some reasons, i need to pop up a form containing webbrowser control using windows service. But when it is initializing the web browser control in the form, it is throwing an error in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.