views:

20

answers:

1

I am sending web requests to a site and getting the responsestream and would like to perform the button click programatically, here is the tag for the event:

 <a href="#" onclick="getResults('apple', 2); return false;" id="nextLink" class="next button_grey_sm">Next &raquo;</a>

any ideas appreciated?

+1  A: 

I used a web browser control... it might not have been the best approach since I don't know what page it's on, but here's my code:

Dim wb As WebBrowser = New WebBrowser
wb.Navigate("http://www.mydomain.com")
wb.Document.GetElementsByTagName("a")(2).InvokeMember("click")

This basically "clicks" the 3rd (the array is 0-based) tag on the current page.

HTH

Logan Young