Screen scrape .aspx page using WebClient...

T

tscamurra

Hello,

I have a web app that performs screen scaping and submits a form. My
code worked until the page was changed to use .aspx code. I am
updating my code to conform to the new pages but am having difficulty
submitting the page.

I use the WebCLient Class and create a collection of form values,
however there is not 'submit' button. There is an anchor tag that has
an href that calls the familiar __DoPostBack function.

I am hoping someone knows how to submit the page? Can I call the
Javascript, or invoke the href or is this so simple I am missing
something. The page I am scraping is a login page. So I am
programmatically setting a known user and password.

Any help would be greatly appreciated.

Thank you,
Tony
 
J

Joerg Jooss

Hello Peter,
I doubt you can do that using WebClient. You will need to use
HttpWebRequest/HttpWebResponse.

You could use WebClient, but only in very specific scenarios such as a cookieless
web apps. Once cookie support comes into play, HttpWebRequest/Response are
the way to go.

Cheers,
 
A

alex_f_il

You can try SW ExplorerAutomation
(SWEA)(http://home.comcast.net/~furmana/SWIEAutomation.htm). It allows
to create an automation API to any Web application. SWEA applications
can be run from ASP.NET. In this configuration, the SWEA runtime runs
IE under a specified user account (can be limited account) which should
have an user profile (ASP.NET account has no user profile). While the
solution may not be perfect for all cases, it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top