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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:47:29+00:00 2026-05-18T03:47:29+00:00

Basically I want to take a URLString and break out all variables and their

  • 0

Basically I want to take a URLString and break out all variables and their values and Post them to another page with a redirect to taht page.. How do i pull this off without having a form and actuall submitting etc…

This is what i got..

   string url = "http://www.blah.com/xyz.aspx";


        StringBuilder postData = new StringBuilder();

        postData.Append("CustomerID=" + HttpUtility.UrlEncode("Hello Rico") + "&");
        postData.Append("FirstName=" + HttpUtility.UrlEncode("HelloFirstName"));
        //ETC for all Form Elements    

        // Now to Send Data.    
        StreamWriter writer = null;

        HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
        request.Method = "POST";
        request.ContentType = "application/x-www-form-urlencoded";
        request.ContentLength = postData.ToString().Length;
        try
        {
            writer = new StreamWriter(request.GetRequestStream());
            writer.Write(postData.ToString());
            writer.Flush();

            HttpWebResponse WebResp = (HttpWebResponse)request.GetResponse();

            //Now, we read the response (the string), and output it.   
            Stream Answer = WebResp.GetResponseStream();
            StreamReader _Answer = new StreamReader(Answer);
            Response.Write(_Answer.ReadToEnd());

        }
        finally
        {
            if (writer != null)
                writer.Close();
        }   
  • 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-18T03:47:30+00:00Added an answer on May 18, 2026 at 3:47 am

    Since you cannot redirect and post at the same time, your only option is to render an html page with a form that is submitted on page load. Unless you can make the receiver accept the parameters in the url of course. If it is an asp.net page you want to “post” to, it should not really matter if you send data in the querystring, unless of course you are sending massive amounts of data.

    Remember that redirecting, is the same as telling the browser to “go to this page instead”. This information is in the http header that you return. Therefore, there is not a lot of overhead in rendering a form that auto submits.

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

Sidebar

Related Questions

Given this structure.. I basically want to be able to take a list of
Im trying to create a list of strings using some recursion. Basically i want
I want to take two value from user i.e name and location and then
That's a mouthful of a question but basically I want to know if I
I want to move a large chunk of data i've got in my memory.
I need to duplicate several tables in a single database. Basically we have an
I have a caption for a GUI control, and I want to convert it
Is it possible to position the bottom element #fooBar 40px below the ul#bar that
My array looks like this: Array ( [Bob] => Red [Joe] => Blue )
I'm currently working on being able to import a DLL written in Fortran into

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.