Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate a URL 2

Status
Not open for further replies.

Craftor

Programmer
Feb 1, 2001
420
NZ
Hi all

I am looking to write a validation routine for validating a URL entered into a textbox. I looked at the ResolveURL() method of several controls but this just returns the URL relative to the template directory.

I toyed with the idea of looking for things like the presence of ".co" but this leaves out the possibility of .org etc. I also can't look for the inclusion of the entry could be an internal link.

Is there any method that someone knows of that could do this at all?

Thanks as always

Craftor

:cool:
 
Hi
If you are looking just to verify that the url is in a valid format, then try
and type url in the search box - there are some reg exp patterns there

If you are trying to verify that the url exists on the internet, you are going to have to try and connect to it, perhaps with the Internet Explorer control.

Hope this helps Mark [openup]
 
Thanks Custom24 - that's exactly the sort of thing I'm looking for :)

Craftor

:cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top