Thread: HTM page manipulation

  1. #1
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853

    HTM page manipulation

    I want generally to get information about a web page. I manage to get the htm code and save it, in order to parse it. But the page (.aspx) has multiple pages that you can select by pressing selecting the page.

    I know that if I select the page it will do
    Code:
    javascript:_doPostBack(something)
    Can I do this programmatically? Like force it to execute the javascript function with the specific parameter I choose? Is there another way to make it load a page that you don't know the specific link?

  2. #2
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Here is the javascript function
    Code:
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    There are two hidden fields __EVENTTARGET and __EVENTARGUMENT in the form.
    I would want
    1) to get those fields
    2) change them accordingly
    3) force the page to postBack

    Can I do this with GET/POST methods from the HttpWebRequest? This is a whole new field from me

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    (why am I filling alone? :P)

    Well, googling around didn't give me any answer. But I found an intersting class called
    WebBrowser. It just lets you do whatever you want, simple as that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Page File counter and Private Bytes Counter
    By George2 in forum Tech Board
    Replies: 0
    Last Post: 01-31-2008, 03:17 AM
  2. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  3. virtual memory
    By sweets in forum C Programming
    Replies: 6
    Last Post: 11-06-2004, 06:55 AM
  4. C Graphics - Page Flipping
    By z0diac in forum C Programming
    Replies: 1
    Last Post: 10-29-2002, 01:21 AM