Suppressing Download dialog

mithu

Newcomer
Joined
Aug 2, 2004
Messages
1
I am new to .net. I have a problem. My web service returns byte array. I also get the mime type from the web service. When I try to write it in the client side, it treated as .aspx. So I added Response.AddHeader("Content-Disposition", "inline; filename=Document.doc"); . Now the file is opening in word , but I get the download dialog box. Could somebody help me how to suppress this dialog box?

Thanks
 
You can't supress the "download dialog" as you have to think of a web browser as a dumb terminal you have no control over. The dialog is purely up to the browser, you can't touch it.

You do realize you have to "download" the .DOC before you can view it. Without a download dialog it won't open.

But on another note, I recall MS Sharepoint 2003 having links to Excel and Word documents and no download dialog pops up when you click the link. So ignore everything I said :)
 
CLIENT-SIDE SOLUTION ONLY

If you go to "Configuration Panel" and to "Folder Option" and that you go to "File Type" and that you select your extension and that you click Advanced you can check the third checkbox. it will open inside the browser.

but remember... it only work like that if the client wish to do so.
 
Back
Top