Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to 'POST' data when using Mirosoft WebBrowser ActiveX control?

92 views
Skip to first unread message

tommyliu

unread,
Apr 17, 2009, 9:41:55 AM4/17/09
to
I need to pass 'POST' data to WebBrowser ActiveX control.
How to assign data there?
Here is similar code I found from VB.NET. But how to use it
via Powerbuilder? (e.g. vPost =
ASCIIEncoding.ASCII.GetBytes(cPostData), How do I use the
similar code on Powerbuilder for the
'ASCIIEncoding.ASCII.GetBytes' )

-----http://support.microsoft.com/kb/311294-----

cFlavor = cboFlavor.SelectedItem
cParamFlavor = "Flavor="
cSeparator = "&"
cParamName = "FName="
cPostData = cParamName & txtBoxName.Text &
cSeparator & cParamFlavor & cFlavor
vHeaders = "Content-Type:
application/x-www-form-urlencoded" + Chr(10) + Chr(13)
vPost = ASCIIEncoding.ASCII.GetBytes(cPostData)

AxWebBrowser1.Navigate2("http://<server>/WebForm1.aspx",
Nothing, Nothing, vPost, vHeaders)

Roland Smith [TeamSybase]

unread,
Apr 17, 2009, 10:04:35 AM4/17/09
to
I have a WebBrowser example on my website.
http://www.topwizprogramming.com/freecode_webbrowser.html

It has an of_Navigate function that calls Navigate. You should be able to
add Navigate2 by following my example.

<Tommy Liu> wrote in message news:49e88723.107...@sybase.com...

tommyliu

unread,
Apr 17, 2009, 11:07:56 AM4/17/09
to
Thank you.

I found one PB function which works as same as
'ASCIIEncoding.ASCII.GetBytes'

vHeaders = "Content-Type:application/x-www-form-urlencoded"
+ Char(10) + Char(13)
lbob_post = BLOB(as_postdata, EncodingUTF8! )

ole_WebLinker.Object.Navigate(ls_url , "None",
"TargetFrame", lbob_post, vHeaders)

Tommy

0 new messages