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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:09:52+00:00 2026-05-22T12:09:52+00:00

I’m trying to do something like Server.Execute(page1.aspx); but I need to pass POST data

  • 0

I’m trying to do something like

Server.Execute("page1.aspx");

but I need to pass POST data to this page.

Does anyone know how I can achieve this? Since Server.Execute only takes in 3 params, and none of these are anything to do with POST data.

Solution: 7 Hours Later…

Unfortunately, the only way I was able to do this was to pass the parameters in the query string (using a GET request). I’ve searched the web for a while now, and finally felt this was good enough for my application. I tested, and somehow the GET URL size limit of 4K chars does not hold good in this context.

I was able to successfully execute a Server.Execute method with 640K+ chars to another page, and it worked beautifully.

Server.Execute("~/pageB.aspx?foo=" + new string('x', 640000));

In pageB: Page_Load();

Response.Write(Request["foo"].ToString().Length());

Result: 640000

So I guess this will have to do for now.

I was afraid of having to send large parameters in the query string, but since it works, who am I to complain! 🙂

  • 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-22T12:09:53+00:00Added an answer on May 22, 2026 at 12:09 pm

    Is using Server.Execute() absolutely necessary?

    If not, to get page A to post to page B, you could set page A’s .PostBackURL to page B, then in page B check if (this.PreviousPage != null); if it’s not null, then in page B you can use something like this.PreviousPage.FindControl() or ((PageA)this.PreviousPage).txtFirstName.Text to get at the input values.

    If some values aren’t directly user-input, you could still assign the values to hidden controls, and make those hidden controls public properties of page A so that page B can access them after casting .PreviousPage to PageA.

    If you don’t want to require type-safe references to a specific sending class or interface, the simplest alternative would probably be to use something like this technique to encapsulate values in Context.Items:

    // to store in sending page:
    Context.Items("UserName") = UserName.text;
    // then call server.Transfer...
    
    // to retrieve in receiving page:
    string userName = (string)Context.Items("UserName");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
Basically, what I'm trying to create is a page of div tags, each has
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I want to construct a data frame in an Rcpp function, but when I
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.