Is there a way to detect a complete URL?

  • Thread starter Thread starter ThunderMusic
  • Start date Start date
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
 
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
 
Back
Top