• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

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.
0
Larry Brister
Asked:
Larry Brister
  • 4
  • 3
  • 2
1 Solution
 
Joel CoehoornDirector of Information TechnologyCommented:
Use Response.Redirect() or Server.Transfer()
0
 
apeterCommented:
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");
0
 
Larry Bristersr. DeveloperAuthor Commented:
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
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Larry Bristersr. DeveloperAuthor Commented:
I also need to get backi the reply
0
 
Joel CoehoornDirector of Information TechnologyCommented:
Ah- so you don't actually want to show the vendor's page in the browser?
0
 
Larry Bristersr. DeveloperAuthor Commented:
jcoehoorn:

That's correct
0
 
apeterCommented:
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.
0
 
Joel CoehoornDirector of Information TechnologyCommented:
In that case, use System.Net.WebClient to send the request.
0
 
Larry Bristersr. DeveloperAuthor Commented:
jcoehoorn,
Can you give me an example?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now