By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,263 Members | 1,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,263 IT Pros & Developers. It's quick & easy.

Screen scrape .aspx page using WebClient...

P: n/a
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

Feb 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I doubt you can do that using WebClient. You will need to use
HttpWebRequest/HttpWebResponse.

Here are some artiles.

http://www.codeproject.com/dotnet/webex.asp
and
http://www.hightechtalks.com/archive...matically.html

<ts*******@msn.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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

Feb 6 '06 #2

P: n/a
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,
--
Joerg Jooss
ne********@joergjooss.de
Feb 6 '06 #3

P: n/a
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.

Feb 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.