Running Javascript

Topics: Developer Forum, Project Management Forum, User Forum
Feb 13, 2009 at 8:45 AM
Hello,

I have question... I've been using Html Agility Pack for a while, and it really doing well. Infact, I use it in order to scarp content from a certain site. Although it works well, I've encounterd a problem: In a specific case, I need to click on a link button before I'll try to process the page. The link button itself casuses a postback by pointing to the following href:
 "javascript:__doPostBack('ctl00$SideMenu1$aSrc','')"
I've tried to call formProcessor.Web.Load() with the specific JS code but with no success.

I wonder if anyone has a solution to this specific problem? Any help will be greatly appreciated! :-)
Thank you very much, and have a pleasent day.

Nadav Yeheskel,
www.any-techs.co.il
www.any-techs.com
Mar 10, 2009 at 5:01 AM
Phhfttt... talk about a nightmare about doing that in C#. I know search engine crawlers do stuff like this, but I'd imagine the best approach for them is to literally fork code from browser code to keep behaviour consistent.

Unless you've got google resources, might be best to load an instance of a browser exe from your app, then create a pipe between that server-side browser instance and your application.

That way, the page will behave properly.

I'm sure someone on the net has tried/done this.