Is there a way to detect a complete URL?

T

ThunderMusic

Hi,
We have a web form where the user should enter a complete URL including the
protocol, so "www.myURL.com" is not considered valid, it should be
"http://www.myURL.com" or "mms://www.myURL.com" or something like that...

Is there a way I can detect if an URL is complete?
"mailto:[email protected]" should be supported... so I can't look if it
contains "://" Is there a regex I can use? Is there a class for this
fonctionality included in the .NET framework?

Thanks

ThunderMusic
 
D

Duy Lam

ThunderMusic said:
Hi,
We have a web form where the user should enter a complete URL including the
protocol, so "www.myURL.com" is not considered valid, it should be
"http://www.myURL.com" or "mms://www.myURL.com" or something like that...

Is there a way I can detect if an URL is complete?
"mailto:[email protected]" should be supported... so I can't look if it
contains "://" Is there a regex I can use? Is there a class for this
fonctionality included in the .NET framework?

Thanks

ThunderMusic

In webpage or web control, you can use property Request.Url to get
current request url
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top