I'm hoping someone can help with what must be something really easy but for the life of me I can't see where the error is.
Basically, what i'm trying to do is integrate a UPS 'Track by Reference' tool in to my application. Now after taking the UPS page apart (which i've included) I can see that it gets the information from the page and using the POST method for form. After having a good look around some forum posts here I put some code together which I thought would do the trick. Which is:
Code:
Imports System.Text
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim vHeader, vURL, vPostData
vHeader = "Content-Type: application/x-www-form-urlencoded" & Chr(10) & Chr(13)
vURL = "http://wwwapps.ups.com/WebTracking/reference"
vPostData = ASCIIEncoding.ASCII.GetBytes("shipmentType=package&ReferenceNumber=123456789&FromPickupDay=&FromPickupMonth=6&FromPickupYear=2007&ToPickupDay=8&ToPickupMonth=9&ToPickupYear=2007&DestinationCountry=gb&AgreeToTermsAndConditions=yes&HIDDEN%5FFIELD%5FSESSION=jMs?@VLq?@|bZusm\V@rJfLd[vLhZuwmQEdcXETmPeddZEPHZV@kS~hEh|VjKN[K??@w[F[K???@DC@UMVC????B[vG?CUh`\eCm\VPhZAxGWVLgRUDo@O^Yo[KUWLCB??HE??hkZuDcPeDb\E|qQO?H\E`qXVLgZupc]F?~O???????BF[G????C?????Hs??lGQSPCPSx^RCdRTFLq?@LiWVX`JfTsYUomQEDrYFP`WepdCzkNHQDIxJ_B??HE??hkZuDcPeDb\E|qQO?H\E`qXVLgZupc]F?~O???????AF[G????Ao????Ds??LkZuLs??TdZd|FOf`s?@LSScDBQt|COTP@VspHRcTHTCTL[F`w&loc=en%5FGB")
WebBrowser1.Navigate(vURL, "", vPostData, vHeader)
End Sub
End Class
Now when I click the button to update the WB with what should be the results of my search, I just get the main 'Track with Reference' page with the boxes filled in with the data I put in my application, but when I use the same info in the stripped down version of the html I made it all works fine.
I have included the stripped down htm file and a screenshot of both how the results should look (ups tracked.bmp) and also the one where it chucks me back to the start with my application (ups default.bmp).
I hope I explained what I wanted in full and didn't lose anyone on the way