Link Checker

Introduction

In this article I will show you how to create a program that checks whether the links in your web application are active or not. We will use Internet Transfer Control to accomplish this task. This is a real world example where you will see the real use of Internet Transfer Control.

About the application
Internet Transfer Control is a very handy control. The program will check each link in the web page to see if it's functioning or not. Suppose, I add web page addresses of different people on my web page, now the web pages usually move to different locations or people simply put their sites off the internet, and all of a sudden my links are dead. If I have more than 100 links on my page, then to check all those pages manually will be a hectic task and we can't check the URLs on a regular basis. So, we need to automate this process. An easy way is to keep a links database either in Access or in Excel and then check all the links in the database whether they are functioning. You can populate your web page with the live links from your database.

What does this program do?
The program we are going to create will perform the following tasks:

1. The program will open a worksheet.
2. It will use OLE Automation to read the first URL and see whether it's functioning.
3. Write data back to the worksheet, indicating the result for the URL.
4. Repeat the preceding steps for all the URLs in the list.
5. Save and close the worksheet.

You might also like...

Comments

About the author

S.S. Ahmed United States

S.S. Ahmed is a senior IT Professional and works for a web and software development firm. Ahmed is a Microsoft Office SharePoint Server MVP. Ahmed specializes in creating database driven dynamic...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - Martin Fowler