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

I'm pretty stuck here for what to do. I basically want to take all
Basically I want to take an image that the user chooses from their photo
Basically I want to take all the names (RequiredAccount, RequiredContact, RequiredOwner) for all the
I have a partial view that I want to basically take care of itself
Basically I want to take the following: And make it match the styling of
I basically just want to take a 8 character ASCII value 003fc000 and convert
Basically I want is to aggregate some values in a table according to a
I basically want to take two images taken from the camera on the iPhone
Basically I want to take something like: textheretextheretexthere <table> <tr><td>heres some stuff</td><td>and some morestuff</td></tr>
Basically I have a two databases on SQL Server 2005. I want to take

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.