Solved

ASP.NET Form Post

Posted on 2008-06-11
9
174 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:jcoehoorn
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

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

Expert Comment

by:jcoehoorn
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:
jcoehoorn earned 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

786 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