Navigate2 & Postdata question

B

Bruce Thompson

Hi

I am trying to use the Postdata option of the Navigate2
method of IE.

The code I am using, (straight from Microsoft) is
Sub Command1_Click()
Dim URL As String
Dim Flags As Long
Dim TargetFrame As String
Dim PostData() As Byte
Dim strpostdata As String
Dim Headers As String

URL = "http://www.somesite.com" ' A URL that will accept a
POST
Flags = 0
TargetFrame = ""

PostData = "Information sent to host"

' VB creates a Unicode string by default so we need to
' convert it back to Single byte character set.
PostData = StrConv(PostData, vbFromUnicode)

Headers = "Content-Type: application/x-www-form-
urlencoded" & vbCrLf
WebBrowser1.Navigate URL, Flags, TargetFrame, PostData,
Headers

End Sub

When I use it, I get nothing. The PostData is not
tranmitted to my .asp page. If I
use "www.site.com/page.asp?this info" all is well.

Any thoughts you may have or any tips would be greatly
appreciated.

Thanks
Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top