Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2003, 07:57 AM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please help with strange file download behavior!

I'm trying to start a file download, and everything seems to work fine, except that there is a strange behavior in Internet Explorer. Basically, I'm appending to the HTTP Header to force the file download dialog - it's the one with the following four buttons: Open | Save | Cancel | More Info.

If I choose "Save", everything works fine. I choose the destination for the file and it downloads properly.

Here's the problem:

If I choose "Open", the dialog diappears and then reappears immediately. After clicking "Open" for a second time the document opens properly in a new window. I do not want to allow the document to open in the current browser window - I want to force the download dialog.

Here's the important part of the code:

        Response.Clear()
        Response.ContentType=("Application/pdf")
        Response.AppendHeader("Content-Disposition", "attachment; filename=""" & str_fileName & """")
        Response.WriteFile(fullPath)
        Response.Flush()
        Response.End()





Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Behavior With Anchor in XSLT kwilliams XSLT 6 July 21st, 2005 01:52 PM
Strange behavior Listview under XP pavel Pro VB 6 1 June 1st, 2005 05:14 AM
STRANGE behavior..SQL Help skotman Classic ASP Databases 7 June 6th, 2004 02:55 PM
Strange behavior of DateTimePicker? wwz VS.NET 2002/2003 0 February 19th, 2004 06:56 AM
Chp3, pg 100. Strange behavior brandonsaxe BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 20 November 3rd, 2003 07:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.