Larry Brister
asked on
WEB Form POST in code behind
How would I accomplish this in vb code behind?
<form name="DateSelect" runat="server" action="http://www.domaincom/reserve.php" method="POST" target="_self">
<input type="hidden" name="cust_memberid" value="EX80000">
---MORE HIDDEN INPUTS-----
<input id="Submit1" type="submit"
value="submit" OnClick="return checkDates(this.form)"/>
</form>
I have the code below and need to modify the second sub to get the post back with however the "return checkDates..." is working
<form name="DateSelect" runat="server" action="http://www.domaincom/reserve.php" method="POST" target="_self">
<input type="hidden" name="cust_memberid" value="EX80000">
---MORE HIDDEN INPUTS-----
<input id="Submit1" type="submit"
value="submit" OnClick="return checkDates(this.form)"/>
</form>
I have the code below and need to modify the second sub to get the post back with however the "return checkDates..." is working
....blah...blah...blah...
_wXML &= "<input type=""hidden"" name=""numrooms"" value=""2"">"
_wXML &= "<input type=""hidden"" name=""sh"" value=""yes"">"
_wXML &= "<input type=""hidden"" name=""lang"" value=""en"">"
_wXML &= "<input type=""hidden"" name=""grp"" value=""exotictrav"">"
GetReservationsInventory("http://www.reservationdomain.com/reserve.php", _wXML)
Public Sub GetReservationsInventory(ByVal URI As String, ByVal Parameters As String)
Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(URI)
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim ds As DataSet
Try
' Create the web request
request = DirectCast(WebRequest.Create(URI), HttpWebRequest)
request.ContentType = "application/x-www-form-urlencoded"
request.Method = "POST"
' Get response
response = ----WHAT?----
Finally
If Not response Is Nothing Then response.Close()
End Try
End Sub
ASKER
tillgeffken:
When I run this post in regular HTML it posts to the remote domain...which then does it's own thing and a redirect to it's processing page.
The submit buttom looks like this...
<input type="submit" name="availcheck" value="Submit" onClick="return checkDates(this.form)">
When I run this post in regular HTML it posts to the remote domain...which then does it's own thing and a redirect to it's processing page.
The submit buttom looks like this...
<input type="submit" name="availcheck" value="Submit" onClick="return checkDates(this.form)">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window