I have an object created in javacript with a lot of data, and I serialize it in JSON to send it to the server. After that, the server should do some work and create a dynamic file so that it can be downloaded. For the last procedure, I created ASHX, but can be changed. I already get "httpcontext", which I found in another question, how to work with it to get data from JSON, so my question is not related to this.
The problem (more JS-oriented) is this:
How can I send JSON to ASHX as a URL / GET / POST for a common handler to avoid the “ajax response” and to open the user a new window with dynamically generated link?
Thank you, sorry for my English (please edit) and good wishes!
Note 1: I can’t use the code of the third part
Note 2: I can’t use JSON.NET
Note 3: I can’t save the report on the server, so the answer must be a generated file for downloading, especially since the download itself is the server’s response.
--- UPDATE: ----
I read this question:
Is it possible to host JSON without using AJAX?
The only thing I don’t understand from this question is how to make it work, thinking that I have a “download link”
source
share