Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.NET Form Post

Posted on 2008-06-11
9
Medium Priority
?
186 Views
Last Modified: 2013-11-26
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
Comment
Question by:lrbrister
  • 4
  • 3
  • 2
9 Comments
 
LVL 18

Expert Comment

by:Joel Coehoorn
ID: 21760222
Use Response.Redirect() or Server.Transfer()
0
 
LVL 25

Expert Comment

by:apeter
ID: 21760903
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
 

Author Comment

by:lrbrister
ID: 21764542
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:lrbrister
ID: 21764673
I also need to get backi the reply
0
 
LVL 18

Expert Comment

by:Joel Coehoorn
ID: 21764818
Ah- so you don't actually want to show the vendor's page in the browser?
0
 

Author Comment

by:lrbrister
ID: 21765164
jcoehoorn:

That's correct
0
 
LVL 25

Expert Comment

by:apeter
ID: 21765191
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
 
LVL 18

Accepted Solution

by:
Joel Coehoorn earned 2000 total points
ID: 21765660
In that case, use System.Net.WebClient to send the request.
0
 

Author Comment

by:lrbrister
ID: 21765984
jcoehoorn,
Can you give me an example?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question