Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 599285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:28:54+00:00 2026-05-13T16:28:54+00:00

I admit I got kinda confused with Http requests and responses, so I’ll begin

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:28:54+00:00Added an answer on May 13, 2026 at 4:28 pm

    It sounds like you shouldn’t be using AJAX / XMLHttpRequest at all. Just create a form that posts to the second page like normal, ie:

    <form action="Default2.aspx">
      <!-- put the form elements here -->
      <input type="submit" value="Submit">
    </form>
    

    XMLHttpRequest is for getting server-side data from a different page/script and doing something with that data without leaving the current page. When you want to leave the current page you just use a form, as has been the standard for 15+ years.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'll be the first to admit that this is cut and past programming. I've
First of all I have to admit that my programming skills are pretty limited
We have an app with an extensive admin section. We got a little trigger
Ok, strange setup, strange question. We've got a Client and an Admin web application
I admit it: I don't bother with too much exception handling. I know I
I admit - I'm a complete novice when it comes to unit testing. I
I admit this is not strictly a programming question, although I do use my
I admit, I don't know too much about javascript, mostly I just steal and
More times than I'd like to admit I've had people new to a project
This might seem like a stupid question I admit. But I'm in a small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.