Hello, I have 2 json objects that are in javascript. How can I store them on the server, in files or in a request to transfer? Please with code examples. ASP.NET 4.5 Backend
2 answers
On the client, convert it to string :
myStringObj = JSON.stringify(myObj); Then send it in any way to the server (xhr, form submit); Process here
And how you can keep better, either a database or a static json, depends on what you are doing.
|
From the front, everything is simple, if there is a jQuery, then just
$.post("/xls",{'data' : 'data'},onAjaxSuccess) onAjaxSuccess(data){ console.log('Всё ОК'); } with a backend to help nesmogu, ASP.NET I do not know.
|