Here is my code:
PS - All this code is done inside the Custom Code of SSRS
Expand|Select|Wrap|Line Numbers
- Function IsValid(ByVal Url As String) As Boolean
- Dim URLRes As Net.FileWebResponse
- Dim URLReq As Net.FileWebRequest
- Dim myURI As New Uri("file://www.example.com/" & Url & ".jpg")
- Try
- URLReq = Net.FileWebRequest.Create(myURI)
- URLReq.Credentials = Net.CredentialCache.DefaultCredentials
- URLRes = URLReq.GetResponse()
- Return True
- Catch ex As Exception
- Return False
- End Try
- End Function