Solved

ASP.NET Form Post

Posted on 2008-06-11
9
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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: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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

738 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