hassanintern
New member
- Joined
- Jun 4, 2013
- Messages
- 4
- Programming Experience
- Beginner
i want to see if the hyperlink ie entereted in textbox1: is valid or not. i developed this code but this code only gives hyperlink not working. any thoughts what is wrong with it?
Public Class Form1 Dim req As System.Net.WebRequest Dim resp As System.Net.WebResponse Public Sub IsURLValid() Dim url As New System.Uri("TextBox1.Text") req = System.Net.WebRequest.Create(url) resp = req.GetResponse() End Sub Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If req Is Nothing Then MessageBox.Show("Hyperlink not working") Else MsgBox("hyperlink is good") End If End Sub End Class
Last edited by a moderator: