Check url exists

P

Pete

Hi,

i'm building a datagrid that grabs a documents location out of a
database and puts them in as a hyper link column.

Ideally i'd love to be able to check the validity of the link and only
display links to documents that actually exist. And alternatively
generate a list of invalid links.

Problem is that a link to an invalid document in some cases redirects
to a generic web page saying item not found so you don't get the 404
response back.

Am i just asking too much?

Pete

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
G

Guest

Hello Pete,

Afraid that is, indeed, asking too much. You can post an http request for
each link you display (do realise the large increase in time this will result
in for your page to load) and get the resultstatus.

If it's not a 404, you'll have to assume the page is valid, no way around
that!

Good luck,
Daniel
 

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

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top