Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. open file/document

open file/document

Scheduled Pinned Locked Moved ASP.NET
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    venky456
    wrote on last edited by
    #1

    hi this is the code for show the download dialog page code.it works well.but my requirement is just open.but it shows open/save/download.it takes lot of time. i need when we click on the link then open the page . plz help me to solve the problem. string filename = Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ""); Response.Flush(); Response.WriteFile(filepath); regards venkaT venkat

    M 1 Reply Last reply
    0
    • V venky456

      hi this is the code for show the download dialog page code.it works well.but my requirement is just open.but it shows open/save/download.it takes lot of time. i need when we click on the link then open the page . plz help me to solve the problem. string filename = Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ""); Response.Flush(); Response.WriteFile(filepath); regards venkaT venkat

      M Offline
      M Offline
      Malcolm Smart
      wrote on last edited by
      #2

      You can't avoid this. AFAIK it is in built security. You wouldn't want any application to run on your machine when you click a link would you? This ensures you know what is behind the link you have clicked and therefor your responsibility to run. I don't believe you can turn it off.

      "More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

      "This time yesterday, I still had 24 hours to meet the deadline I've just missed today."

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups