Pressing a button in an webpage
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Pressing a button in an webpage

  1. #1
    Join Date
    Jun 2005

    Pressing a button in an webpage

    Hello everybody,

    I have the following problem.

    I can download the content of a webpage on site using CInternetSession and CInternetSession::OpenURL().

    So far, so good.

    Now on the webpage I'm interest in there is a button, which, when pressed, downloads a file to my computer. Now I would like to write a code for downloading this file. That is, I want the server to "think" I have pressed the button. I looked up through GetHttpConnection and GetHttpConnection::OpenRequest() by I coudn't find how to do it.

    Can anyone help me? Thanks a lot.


  2. #2
    Join Date
    Nov 2002

    Re: Pressing a button in an webpage

    A button-press on a web page often sends a POST request to the server.

    You can "spy" on the communications between a working browser and the server, when you press a button, to see what messages are exchanged. Then you can write your program to mimic the exchanged messages. One popular "spy" is the Fiddler web proxy, see


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center