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