This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unexplained file download behavior

 
Carlo de Guzman
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

I am working on a site that allows the user to download information to an Excel file. If I use the following code:

.AppendHeader("content-disposition", "inline; filename=" & FileName)

The Excel file displays in the current browser window after I click "Open" in the File Download box that appears. However, the user wants the Excel file to appear outside the browser in another window. So I tried using:

.AppendHeader("content-disposition", "attachment; filename=" & FileName)

Using this code, the Excel file opens in its own Excel window just fine. The problem now is that the File Download box appears twice before I am able to view the spreadsheet.

Is there a way so that the File Download box appears only once, similar to what was happening before I made the code change?

Any help would be very much appreciated.

Thanks!
Carlo
 
Carlo de Guzman
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to clarify, the code samples above are inside a "With HttpContext.Current.Response" block. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic