dotnet-Snippets.com
Snippets: 57 | Registered User: 27 | Visitors online: 16
Main Menu

Home
Random Snippet
FAQs
Contact Us
Imprint
RSS Feeds

Rss All languages
Rss C#
Rss VB.NET
Rss C++
Rss J#
Rss ASP.NET
Google Ads

Sri Lanka .NET 
                Forum Member
Check URL for availability

Author: Tim Hartwig
Programming Language: VB.NET Rating:
not yet rated

Views: 668

Description:

This function checks if a given internet address is available.



Visual Basic
1
2
3
4
5
6
7
8
9
10
Public Function CheckURL(ByVal URL As String) As Boolean
    Try
        Dim Response As Net.WebResponse = Nothing
        Dim WebReq As Net.HttpWebRequest = Net.HttpWebRequest.Create(URL)
        Response = WebReq.GetResponse
        Response.Close()
        Return True
    Catch ex As Exception
    End Try
End Function

This Snippets could be interesting for you:

Poor Excellent
1 2 3 4 5 6 7 8 9 10
Sign in to vote for this snippet.

Comments:
(Please log in to wrtite an comment.)