I'm trying to crawl/scrape a website using c# windows app, getting the initial page is not a problem, but since data is displayed in a multi-page grid, I need to click "next" in code to retrieve more data.
This site's nextButton calls this javascript routine:
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
The eventTarget would be 'butNext' and eventArgument be ''.
With that said, I'm stuck on how to pass these parameters into WebRequest, or if I should use another API for doing this.
Thanks.