how to check if URL is valid?

  • Thread starter Thread starter Rolf Mistelbacher
  • Start date Start date
R

Rolf Mistelbacher

hi.
i have searched on msdn for a while, but found nothing...
is a function available in dot net framework which allows me to check if a
entered URL is valid?
can someone post an example in VB.NET?
thanks
Rolf
 
One option is to make a real request to the URL using HttpWebRequest and
HttpWebResponse and check the status.

hi.
i have searched on msdn for a while, but found nothing...
is a function available in dot net framework which allows me to check if a
entered URL is valid?
can someone post an example in VB.NET?
thanks
Rolf
 
Shiva said:
One option is to make a real request to the URL using HttpWebRequest and
HttpWebResponse and check the status.

That would check if the URL can be reached, but it won't tell you if the URL
is syntactically valid.
 

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

Back
Top