C Programming Tutorials and advice
CProgrammingTrends News Archives About Us Feedback

Recent Articles


C# Stock Quote Class
A couple of months ago one of my readers asked me to build a stock quote class that would automatically update the quote. I forgot about it, but then I found the e-mail and decided to give it a go. I started looking for...

Overload Operators The Right Way In C#
It's a good rule of thumb to overload the equality operators on classes. That ensures a correct comparison between to class instances of the same type. If you don't, .NET automatically uses reflection and that is...

C#: Realtime Currency Exchange Class
Soon, I'm facing a new project where the need for up-to-date currency exchanges is crucial. This is not the first time I've done this, but I wanted to make a reusable, self-maintainable class so I don't have to do...

Validating Strong Passwords In C# And ASP.NET
It's always a good idea to have a password policy when creating new applications. A password policy can vary from project to project, but the important part is just to...


02.15.07


C# - Screen Scraping


By Mads Kristensen

Some say that screen scraping is a lost art because it is no longer an advanced discipline.

That may be right, but there are different ways of doing it. Here are some different ways that all are perfectly acceptable, but can be used for various different purposes.

Old school

It's old school because this approach has existed since .NET 1.0. It is highly flexible and lets you make the request asynchronously.



Low Rate eCommerce & Retail Plans

Modern

In .NET 2.0 we can use the WebClient class, which is a cleaner way of solving the same problem. It is equally as flexible and can also work asynchronous.



The one-liner

This is a short version of the Modern approach, but it deserves to be on the list because it is a one-liner. Tell a nineteen ninetees developer that you can do screen scraping in one line of code and he wont believe you. The approach is not flexible in any way and cannot be used asynchronously.



That concludes the medley of screen scraping approaches. Pick the one you find best for the given situation.

Comments

About the Author:
Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

About CProgrammingTrends
A collection of articles and tutorials designed to help C and C variant programmers in their programming work. C Programming Tutorials and advice

CProgrammingTrends is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagmentNews.com


-- CProgrammingTrends is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal


archives | advertising info | news headlines | free newsletters | comments/feedback | submit article




CProgrammingTrends Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact