473,386 Members | 2,078 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,386 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 6394
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.