Solved

ASP.NET Form Post

Posted on 2008-06-11
9
171 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
 

Author Comment

by:lrbrister
ID: 21764673
I also need to get backi the reply
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now