Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

ASP.NET Form Post

Is it possible to do a form post in code behind?  I have an ascx control with page.ascx.vb and want to reuse a contact us page to do a form post to a vendor php page.
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

Use Response.Redirect() or Server.Transfer()
If your php page is residing in another server you have to use only Response.Redirect like below.

Response.Redirect("www.vendor.com/vendorpage.php");
Avatar of Larry Brister

ASKER

Yea guys...but how do I pass in the parapaters to POSt like I need?

example...FirstName=lr&lastName=Brister&sx=m&etc... from my asp textbozes etc
I also need to get backi the reply
Ah- so you don't actually want to show the vendor's page in the browser?
jcoehoorn:

That's correct
You can get the Form values if the target page is asp.net web page. Else it is giong to be difficult.  But the other way is possible. Posting from a non aspx page to aspx page.
ASKER CERTIFIED SOLUTION
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jcoehoorn,
Can you give me an example?