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

Check url exists

P: n/a
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
*-----------------------*
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


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

"Pete" wrote:
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
*-----------------------*

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.