• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unexplained file download behavior

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to clarify, the code samples above are inside a "With HttpContext.Current.Response" block. Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic