But, they say that posting to an ASP form you have to add the header information....
"INFO: Header Required Posting HTML Form Encoded Data to ASP Page"
They say the format would be like this:
Private Sub Command2_Click()
Dim strURL As String, strFormData As String
'Change the server to your server name
strURL = "http://yourserver/scripts/testpost.asp"
strFormData = "lname=Doe&fname=John"
Inet1.Execute strURL, "Post", strFormData, _
"Content-Type: application/x-www-form-urlencoded"
End Sub
I have tried this and I can't get the dang thing to work.....
IF ANYONE HAS AN EXAMPLE LIKE THIS WORKING PLEASE HELP!!!!!
Here's a live example...if someone could help me get just this working, I can apply this to the site I am working on which requires a user name and password so I don't want to post that here....
but...here goes...you need a webbrowser on your form called WebBrowser1 and the Internet Transfer Control called Inet
"Search Results for the Keyword - ""
Sorry, No results found for this search"
so, obviously my strFromData is not being included....
??????????
I just attached a small project if anyone wants to download it. It's like my example above but rather than hard coding a search on Ubids site for "computer" I entered a Text box on the form to be able to search for whatever word is put in the text box...But...it still doesn't work...can someone PLEASE tell me what I am doing wrong?
Last edited by Webauctioneer; Apr 24th, 2001 at 09:38 PM.
Well...even though I haven't gotten any responses on this, I thought I would post what I have found....
THIS FREAKING THING DOESN'T WORK!!!!!!!!!!!!!!!!
I setup another little VB app to check status on a USPS
Delivery Confirmation Number....
Private Sub Command1_Click()
Dim strURL As String, strFormData As String
strFormData = "tracknbr=" + Text2.Text
strURL = "http://www.usps.com/cgi-bin/cttgate/ontrack.cgi?"
Inet.Execute strURL + strFormData, "POST", _
"Content-Type: application/x-www-form-urlencoded"
WebBrowser1.Navigate Inet.URL
Text1.Text = Inet.URL
End Sub
This works...but it's really not doing it the right way.
Notice in the Inet.Execute to get it to post the complete string that I need I am adding strURL and strFormData together before stating the "POST" method. And I have to add a "?" on the end of the action URL. This is working but according to Microsoft, it should be:
And you shouldn't have to put the "?" at the end of the action URL.
But, in that format with or without the "?" it does not pass the strFormData to the form, it passes ONLY the action URL.
SO....anybody?.....anybody?....is there something I just don't get here or is Microsoft wrong about the format?