Home All Groups Group Topic Archive Search About

Verify syntax of an URl

Author
18 Aug 2006 9:28 AM
serge calderara
Der all,

I have a text box where my user introduce a URL of type Http:\\.... or
Ftp:\\...
I need to verify that only this type of syntax is valid for my text box

How can I perfomr that ??

Thansk for help

Author
18 Aug 2006 2:19 PM
Joe Kaplan (MVP - ADSI)
Did you look at the Uri.IsWellFormedUriString static method?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"serge calderara" <sergecalder***@discussions.microsoft.com> wrote in
message news:91352FDC-F919-4853-9D3C-EC1B8A0E3D35@microsoft.com...
> Der all,
>
> I have a text box where my user introduce a URL of type Http:\\.... or
> Ftp:\\...
> I need to verify that only this type of syntax is valid for my text box
>
> How can I perfomr that ??
>
> Thansk for help
Author
18 Aug 2006 4:33 PM
serge calderara
no,
Ia was stzarting using regEx as everyone says that it is the key to verify
syntax before anything to prevent undesirable string. But usng it cannot find
the correct way to do it..

regards

Show quoteHide quote
"Joe Kaplan (MVP - ADSI)" wrote:

> Did you look at the Uri.IsWellFormedUriString static method?
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "serge calderara" <sergecalder***@discussions.microsoft.com> wrote in
> message news:91352FDC-F919-4853-9D3C-EC1B8A0E3D35@microsoft.com...
> > Der all,
> >
> > I have a text box where my user introduce a URL of type Http:\\.... or
> > Ftp:\\...
> > I need to verify that only this type of syntax is valid for my text box
> >
> > How can I perfomr that ??
> >
> > Thansk for help
>
>
>
Author
23 Aug 2006 3:07 AM
outlaw
> I have a text box where my user introduce a URL of type Http:\\.... or
> Ftp:\\...
> I need to verify that only this type of syntax is valid for my text box
>
> How can I perfomr that ??


Did you take a look at PathIsURL() ?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/path/pathisurl.asp

m
http://bubbler.net/outlaw/blog