I have user controls on the ASP.Net page (which is using the master page) inside an UpdatePanel There are many functions in which the buttons are included, the control works fine except for a link, where I am trying to send a file to the client while clicking on it.
Control is instant with an object whose performance, action, and optionally ordered to transmit the client. I have previously sent files in this project but before a UserControl, and not behind UpdatePanel, the browser acts like this, like I'm not clicking on the link, even if I can move through the code and I know that this is working.
Response.Clear () Response.AppendHeader ("Content-Properties", "Attachment; File Name = Assignment."). Contact type = "text / xml" 'serialization code' is given here. reaction. Write (seralizedObject) Response.Flush () Response.End () I have tried feedback Turn off Instead, I tried to use the response.optputstream.light . Nothing seems to be working. Am I trying to do as well? Or do I need to prepare some ways to redirect to another page, which will then send the file? UPDATE: In view of the reply received, I change this implementation to another URL (an ASHX file) to actually send the file, but this is not ideal. I am still open to other suggestions on this.
If any UpdatePanel does not work, I still want to send the 'intrinsically' object to another file (like an ash file) that can send the file Was just using the url query to send enough information to rebuild the object in my ohsex file. Needless to say, this is not a very beautiful solution.
You can not stream a file for customers with an updated panel for various reasons. File streaming does not work in this AJAX scenario. Try to remove UpdatePanel and it works without it, and then use it. for more information.
No comments:
Post a Comment