473,382 Members | 1,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to validate a URL

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
Nov 18 '05 #1
5 2805
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" <ne****@microsoft.com> wrote in message
news:uU**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #2
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" <ne****@microsoft.com> wrote in message
news:uU**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #3
I want to check that URL exist in internet or internaet ??

Thanks for your help
"Kumar Reddi" <Ku********@REMOVETHIS.gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <ne****@microsoft.com> wrote in message
news:uU**************@TK2MSFTNGP09.phx.gbl...
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


Nov 18 '05 #4
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" <ne****@microsoft.com> wrote in message
news:uU**************@TK2MSFTNGP09.phx.gbl...
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


Nov 18 '05 #5
"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in
message news:2B**********************************@microsof t.com...
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...
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below)...
5
by: Jim Heavey | last post by:
When should you use the Page.Validate() method? I thought you would use this method if you have some Server side validation (CustomControl's) you wanted to use and this would cause them to be...
11
by: jjbutera | last post by:
I know how to use the ErrorProvider in my winforms..or do I? I validate the values and set the ErrorProvider in the validating event. If not valid, I set e.Cancel = True. I clear the ErrorProvider...
0
by: Marc Scheuner | last post by:
Folks, I'm faced with a dilemma here - I have an XML document and for part of it, I have an XSD schema to validate it - but not for the rest of it. Can I still validate at least part of the...
4
by: Brybot | last post by:
I have a form that i've split up into multiple asp:panels, each panel has a number of validators which work correctly. At on the last panel, i want to commit the data collected to a database. I...
24
by: Mike Hofer | last post by:
Please forgive the cross-post to multiple forums. I did it intentionally, but I *think* it was appropriate given the nature of my question. I'm working on an open source code library to help...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.