How to validate a URL

Discussion in 'ASP .Net' started by ALI-R, Nov 12, 2004.

  1. ALI-R

    ALI-R Guest

    How can I programmatically figure out the a URL that user has been entered
    is valid or not ,I mean wethere it exist or not????

    thanks
     
    ALI-R, Nov 12, 2004
    #1
    1. Advertising

  2. ALI-R

    Kumar Reddi Guest

    What you mean a URL exists or not?
    Do you want to check for certain parameters passed in the query string. For
    the you need to use Request.QueryString["parameterName"]

    "ALI-R" <> wrote in message
    news:...
    > How can I programmatically figure out the a URL that user has been entered
    > is valid or not ,I mean wethere it exist or not????
    >
    > thanks
    >
    >
     
    Kumar Reddi, Nov 12, 2004
    #2
    1. Advertising

  3. ALI-R

    Curt_C [MVP] Guest

    This is an ASP/VBscript sample but the same idea should be available in
    ASP.NET
    http://www.darkfalz.com/1046


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "ALI-R" <> wrote in message
    news:...
    > How can I programmatically figure out the a URL that user has been entered
    > is valid or not ,I mean wethere it exist or not????
    >
    > thanks
    >
    >
     
    Curt_C [MVP], Nov 12, 2004
    #3
  4. ALI-R

    ALI-R Guest

    I want to check that URL exist in internet or internaet ??

    Thanks for your help
    "Kumar Reddi" <> wrote in message
    news:%...
    > What you mean a URL exists or not?
    > Do you want to check for certain parameters passed in the query string.

    For
    > the you need to use Request.QueryString["parameterName"]
    >
    > "ALI-R" <> wrote in message
    > news:...
    > > How can I programmatically figure out the a URL that user has been

    entered
    > > is valid or not ,I mean wethere it exist or not????
    > >
    > > thanks
    > >
    > >

    >
    >
     
    ALI-R, Nov 12, 2004
    #4
  5. Well .NET uses the HttpWequest and HttpWebResponse objects. You can do a
    search on those. The theory is that you make a request passing the url. Then
    you will get a response back. If the response code you got back is a 404
    Error (Page not found), then the URL does not exist.
    Easier said that done I guess.

    "Curt_C [MVP]" wrote:

    > This is an ASP/VBscript sample but the same idea should be available in
    > ASP.NET
    > http://www.darkfalz.com/1046
    >
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "ALI-R" <> wrote in message
    > news:...
    > > How can I programmatically figure out the a URL that user has been entered
    > > is valid or not ,I mean wethere it exist or not????
    > >
    > > thanks
    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=, Nov 12, 2004
    #5
  6. ALI-R

    Mark Rae Guest

    "Tampa .NET Koder" <> wrote in
    message news:...

    > Well .NET uses the HttpWequest and HttpWebResponse objects. You can do a
    > search on those. The theory is that you make a request passing the url.
    > Then
    > you will get a response back. If the response code you got back is a 404
    > Error (Page not found), then the URL does not exist.
    > Easier said that done I guess.


    Yes indeed though, of course, the site could be down for maintenance or
    whatever while you're running the check...
     
    Mark Rae, Nov 12, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug
    Replies:
    0
    Views:
    519
  2. Jon paugh
    Replies:
    1
    Views:
    885
  3. Guoqi Zheng

    validate an url

    Guoqi Zheng, Oct 8, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,298
    jongalloway
    Oct 10, 2004
  4. franz

    regEx to validate a web url

    franz, Sep 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,030
    Joerg Jooss
    Sep 14, 2005
  5. Just D.
    Replies:
    0
    Views:
    511
    Just D.
    Aug 11, 2004
Loading...

Share This Page