POST method 
Author Message
 POST method

Hi,

I am having a lot of difficulty getting the POST method to work with either
the WebBrowser control or the internet transfer control. I have read the KB
article on in, and am still unable to make it work, any help anyone can give
me on getting it to work with either control would be gratefully received.

Cheers,

Kris.



Sat, 26 Oct 2002 03:00:00 GMT  
 POST method
I once used inet control to send data to my ASP pages, the code like this
    Me.Inet1.Execute "MyServer/MyASPpage", "post", Me.Text3.Text,
"Content-Type: application/x-www-form-urlencoded"

The parameter "Content-Type: application/x-www-form-urlencoded" is a must if
you want to recieve data as a Form (but seems it is not mentioned in MS
KB ).

Me.Text3.Text is the data to send, say "cg=1&cg=2".

In server side code, you can access the values passed in, in ASP, it will
look like:

for i=1 to Request.form("cg").Count
    Response.Write(Request.Form("cg")(i))
next

G. Chen


Quote:
> Hi,

> I am having a lot of difficulty getting the POST method to work with
either
> the WebBrowser control or the internet transfer control. I have read the
KB
> article on in, and am still unable to make it work, any help anyone can
give
> me on getting it to work with either control would be gratefully received.

> Cheers,

> Kris.



Sat, 26 Oct 2002 03:00:00 GMT  
 POST method
Still no joy : (

Quote:
> I once used inet control to send data to my ASP pages, the code like this
>     Me.Inet1.Execute "MyServer/MyASPpage", "post", Me.Text3.Text,
> "Content-Type: application/x-www-form-urlencoded"

> The parameter "Content-Type: application/x-www-form-urlencoded" is a must
if
> you want to recieve data as a Form (but seems it is not mentioned in MS
> KB ).

> Me.Text3.Text is the data to send, say "cg=1&cg=2".

> In server side code, you can access the values passed in, in ASP, it will
> look like:

> for i=1 to Request.form("cg").Count
>     Response.Write(Request.Form("cg")(i))
> next

> G. Chen



> > Hi,

> > I am having a lot of difficulty getting the POST method to work with
> either
> > the WebBrowser control or the internet transfer control. I have read the
> KB
> > article on in, and am still unable to make it work, any help anyone can
> give
> > me on getting it to work with either control would be gratefully
received.

> > Cheers,

> > Kris.



Sat, 26 Oct 2002 03:00:00 GMT  
 POST method


Quote:
> I once used inet control to send data to my ASP pages, the code like
this
>     Me.Inet1.Execute "MyServer/MyASPpage", "post", Me.Text3.Text,
> "Content-Type: application/x-www-form-urlencoded"

> The parameter "Content-Type: application/x-www-form-urlencoded" is a
must if
> you want to recieve data as a Form (but seems it is not mentioned in
MS
> KB ).

> Me.Text3.Text is the data to send, say "cg=1&cg=2".

Right, but what if I need to send binary data in the same way ?
Is the content-type still "urlencoded" ?

(I'm using Inet in an ActiveX control and I can't use ftp instead of
http)

--
Luis

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 27 Oct 2002 03:00:00 GMT  
 POST method
Ok, I finally got it to work, here's how:

Dim URL As String
Dim Flags As Long
Dim TargetFrame As String
Dim PostData() As Byte
Dim Headers As String
         URL = "http://www.anyurl.com"
         Flags = 0
         TargetFrame = ""
         PostData = "username=" & txtUser.Text & "&password=" &
txtPassWord.Text
         PostData = StrConv(PostData, vbFromUnicode)
         Headers = "Content-Type: application/x-www-form-urlencoded" &
vbCrLf
         WebBrowser1.Navigate URL, Flags, TargetFrame, PostData, Headers

Quote:



> > I once used inet control to send data to my ASP pages, the code like
> this
> >     Me.Inet1.Execute "MyServer/MyASPpage", "post", Me.Text3.Text,
> > "Content-Type: application/x-www-form-urlencoded"

> > The parameter "Content-Type: application/x-www-form-urlencoded" is a
> must if
> > you want to recieve data as a Form (but seems it is not mentioned in
> MS
> > KB ).

> > Me.Text3.Text is the data to send, say "cg=1&cg=2".

> Right, but what if I need to send binary data in the same way ?
> Is the content-type still "urlencoded" ?

> (I'm using Inet in an ActiveX control and I can't use ftp instead of
> http)

> --
> Luis

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sun, 27 Oct 2002 03:00:00 GMT  
 POST method
how to post using winsock control?


Tue, 29 Oct 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. FollowHyperlink in Post Method

2. Post-method question

3. Need help with POST method to an asp page

4. Help with POST method

5. problem post method

6. post method

7. Refreshing a POST Method with IE 6.0

8. automate Post method on html form

9. HTTP Post method in WSH?

10. Update another site using their POST method

11. POST Method

12. Inet control and post method

 

 
Powered by phpBB® Forum Software