Hello stackoverflowers, hope you all are doing great.
I admit I got kinda confused with Http requests and responses, so I'll begin by presenting my problem.
I made a webpage that takes user input, processes it and uses XMLHttpRequest POST to send the processed data to another page and display said data into said page.
Now, I can form the XMLHttpRequest using POST just fine, as well as successful redirection; but what I want to actually do is have the second page display the POSTed data.
How can I let the second page read and display the data encapsulated in the POST request in a successful redirection from the first page?
Here is my XMLHttpRequest code, in javascript:
var xmlhttp= new XMLHttpRequest()
xmlhttp.open('POST',"Default2.aspx",false);
xmlhttp.setRequestHeader('Content-Type',
'application/x-www-form-urlencoded');
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
window.location = "Default2.aspx";
}
}
xmlhttp.send(""+x);
I want to handle the POSTed data in the second page in javascript or ASP.NET. Thank you for your time!