tags:

views:

34

answers:

1

I am working on a page where we have a form that the user is filling some information in. When the form is submitted I want to process the information and then redirect to an external server. The catch is that I need post data to go to the external server so a redirect will not work.

Is there a way to programmatically submit a form request with post data?

For the sake of a ridiculous example let's say on http://A.com I have an asp.net page with two inputs that accept numbers and a submit button. When the button is clicked I want to send a post to http://B.com with a post data parameter "AdditionTotal" which contains the sum of the two numbers entered.

A: 

Absolutely, and it's very easy to do.

Normally a page posts back to itself, but you can override this by changing the "PostBackUrl" property of an ASP.NET button.

<asp:Button 
  ID="Button1" 
  PostBackUrl="http://B.com/AdditionTest.aspx"
  runat="server"
  Text="Submit" />
Damien Dennehy
No the point is I need it to post back to itself. I have to do some processing on the current page and then have them sent elsewhere. Right now my only option is to post back to myself, process the information, display another button that sends them to the external site. This results in two clicks to accomplish the action where I should really only need one.
William