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 6850743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:09:46+00:00 2026-05-27T01:09:46+00:00

I have a page (url a) which submits a form programmatically using a WebRequest.

  • 0

I have a page (url a) which submits a form programmatically using a WebRequest.
The page that accepts the form request does a bunch of stuff and then redirects to another page (url b)

Is it possible at all to perform the webrequest (which reads, processes and redirects the form request), which then makes the current page (url a) redirect to the webrequest end location (url b).

I currently have;

  HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(url + postVars);  
  myRequest.AllowAutoRedirect = true;

  HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();  
  myRequest.AllowAutoRedirect = true;

  // Read response stream
  StreamReader myStream = new StreamReader(myResponse.GetResponseStream());  
  string response = myStream.ReadToEnd();  
  myResponse.Close();

This all works fine and everything happens as expected apart from after the myResponse.Close(), I am still at url a, not url b, i.e the page that the request was made from is still the active page

Any ideas on where I am going wrong? Or any better ideas?

I need to be able to.

  • Open page a
  • submit a form programmatically to module b (another page)
  • Be redirected to page c (of which is based on the redirect from module b)

Does that make sense?
Thanks in advance.

  • 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-27T01:09:46+00:00Added an answer on May 27, 2026 at 1:09 am

    I think you are confused about how redirects work – you make a request to Url A, but may ultimately receive a response from Url B if you get redirected there (and AllowAutoRedirect is set to true).

    The client / requestor does not get redirected in any shape or form, just where the response to a client’s request is coming from is. So your “active page” of course never changes.

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

Sidebar

Related Questions

I have a functional JSP page that accepts URL parameters and updates a table
I have a php page that takes in a bunch of url parameters and
Lets say we have a web page with a search input form, which submits
I have a page that is accessed via a URL like this: http://power-coder.net/Test/something.php?id=3#Page1 I
I have a long URL on a web page in Windows that I need
I have a regular form with a url as action to which the form
i have a page,say abc.html, that is having a small form with some fields.
I have a text box , Which i am using for Entering a URL
I have a form which submits to an iFrame (this is a common approach
i have a form that submits some data and gets html back. this html

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.