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. Problem with ForceDownloads

Problem with ForceDownloads

Scheduled Pinned Locked Moved ASP.NET
designxmlhelpquestion
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.
  • A Offline
    A Offline
    AndyASPVB
    wrote on last edited by
    #1

    Hi I have a gridview which has button that allows a user to click and download an xml file stored else where using force download - Response.AddHeader whether. However, whilst this all works fine, when file is downloaded it prompts the user to save the file first and then opens the saved file in a new window. What I want to do is not to save the file first, but to immediately open the file in a new window without saving. I have tried all sorts of things, but none have satisfied the design I want to implement. Thus: 1) Response.ContentType = "Applicaton/vnd.ms-xml"; This cause the user to save the file first before opening in a new page 2) Response.ContentType = "text/xml"; Opens in the window without saving first but opens in the existing window without allowing the user to go back to the gridview from where they clicked. Does anyone have a way round this where I can open in a new window without saving? Thanks

    V 1 Reply Last reply
    0
    • A AndyASPVB

      Hi I have a gridview which has button that allows a user to click and download an xml file stored else where using force download - Response.AddHeader whether. However, whilst this all works fine, when file is downloaded it prompts the user to save the file first and then opens the saved file in a new window. What I want to do is not to save the file first, but to immediately open the file in a new window without saving. I have tried all sorts of things, but none have satisfied the design I want to implement. Thus: 1) Response.ContentType = "Applicaton/vnd.ms-xml"; This cause the user to save the file first before opening in a new page 2) Response.ContentType = "text/xml"; Opens in the window without saving first but opens in the existing window without allowing the user to go back to the gridview from where they clicked. Does anyone have a way round this where I can open in a new window without saving? Thanks

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      Create a separate page for Xml. Use window.open from the GridView Click where you can use your Xml writing logic.

      Castle Rider

      What if I freeze??? Don't forget to breath...

      My: Website | Yahoo Group | Blog Spot

      /xml>

      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