The browser should open the file in the associated application. No?
James C.
-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Vivek
Mukherjee
Sent: Wednesday, April 13, 2005 1:27 PM
To: [email protected]
Subject: ASP.NET- Turning off the Open button on Attachment download.
I have the following code to download a file from an ASp.NET page.
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;
filename=" & file.Name)
Response.AddHeader("Content-Length",
file.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.WriteFile(file.FullName)
Response.End()
The problem is if the user clicks on Open instead of Save As then the
browser opens the file and makes the Back button on the browser disabled
as
the file is saved in the temp folder on the user hard drive. This is
really
annoying as an unsavvy user will not be able to hit back and get back to
where he was.
Is there a way to disable the "Open" button while downloading the file.
Or
open the file in a new browser window, but how?
Any help is appreciated. Thanks
Vivek Mukherjee
[EMAIL PROTECTED]
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's
FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com