It seems like this should be easy, but I cannot find the syntax to open the target web page with WinHTTP.WinHttpRequest.5.1 in VBA (MS Access). Maybe this isn't the right forum for the question, but since the class is used in VB too, hopefully someone has the answer.
Basically I'm POSTing some parameters to an aspx page, which I would like to display after processing the Posted parameters.
Is this even possible?
Here is a subset of the code. the aPostBody string contains the parameters. The code behind thepage.aspx.vb gets the parameters and returns a response.
Dim WinHttpReq As Object
Dim stURL as string
dim aPostBody as string
dim aResponse as string
Set WinHttpReq = CreateObject("WinHTTP.WinHTTPRequest.5.1")
stURL = "http://somewebsite.com/thepage.aspx"
WinHttpReq.setRequestHeader "Content-Type", "multipart/form-data; boundary=" & boundWinHttpReq.Open "POST", stURL, False
aResponse = WinHttpReq.GetResponseHeader("theResponse")
However, instead of getting the response header, I would like to open the page using the parameters I just sent. Ie, if I'm passing a record number, I want the page to display a database record with that record number.
I realize I can pass a query string to open the page to a particular record, but I don't want it accessible that way.