views:

533

answers:

2

I'm building a webcrawler in Perl/LWP. How can the webcrawler follow a link in a ASP.NET grid like this:

<a id="ctl00_MainContent_listResult_Top_LnkNextPage" href="javascript:__doPostBack('ctl00$MainContent$listResult$Top$LnkNextPage','')">Next</a>
+1  A: 

Looks like there's a WWW::Mechanize subclass called WWW::Scripter with javascript and ajax plugins that should be able to do this. Haven't tried that particular approach.

The other alternative is WWW::Selenium, which works great but may be too much overhead/setup for you.

ysth
+1  A: 

See CPAN module HTML::TreeBuilderX::ASP_NET.

Alexandr Ciornii
It almost makes sense that there's a CPAN module specifically to deal with this sickness :)
ysth