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

  • Home
  • SEARCH
  • 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 8045343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:31:09+00:00 2026-06-05T05:31:09+00:00

basically i have to pages like test.aspx and test1.aspx. test.aspx has one button and

  • 0

basically i have to pages like test.aspx and test1.aspx. test.aspx has one button and when button click then a routine is being called which will post data programmatically to test1.aspx page and test1.aspx page will show the data.

so here is the code for test.aspx page

protected void Button1_Click(object sender, EventArgs e)
{
    PostForm();
}

private void PostForm()
{

    WebRequest request = WebRequest.Create("http://localhost:14803/PaypalCSharp/Test1.aspx");
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    string postContent = string.Format("parameter1={0}&parameter2={1}", "Hello", "Wow");
    byte[] postContentBytes = Encoding.ASCII.GetBytes(postContent);
    request.ContentLength = postContentBytes.Length;
    Stream writer = request.GetRequestStream();
    writer.Write(postContentBytes, 0, postContentBytes.Length);
    writer.Close();


}

so here is the code for test1.aspx page

protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
    {
        string str1 = Request.Form["parameter1"];
        string str2 = Request.Form["parameter2"];
    }
}

i just do not understand what is wrong in my code as a result data is not posting to that page. basically i want that when user click on button in test.aspx then data will post from test.aspx page to test1.aspx page programmatically and test1.aspx will show in the browser with posted data. please guide me what i need to change in my code as a result my requirement will be fulfill. thanks

  • 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-06-05T05:31:11+00:00Added an answer on June 5, 2026 at 5:31 am

    I think you’ve made things harder than they need to be. Here are some other options:

    Why don’t you Response.Redirect to test1.aspx in the Button1_Click method and pass the two parameters in the query string?

    Or, if you don’t want the work done in a GET request, why don’t you move the code in test1.aspx into the Button1_Click method and then redirect to test1.aspx after completion?

    Alternatively, why not do a cross page post back to test1.aspx (although cross page posting is dependent on javascript)?

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

Sidebar

Related Questions

I would like to add a preprocessor to HTML pages. Basically, I have a
we are running a click-to-call service, my idea is basically like this: website have
So I have site list on certain pages that basically just have links to
basically I have thumbnails at the bottom of the page and one large image.
I'd like to basically do what Twitter's stream does - have the create action
I have been using the embedded server that visual studio has to test my
So basically what I have been doing is convert one xml file to a
Basically I have a single page on my site that I want any php
Basically I have a single page site that scrolls when the user clicks on
I have a page that will basically be used to concatenate a bunch of

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.