www.allfree-stuff.com


Friday, April 27, 2012

How to Get Filename from URL in VB.Net (Asp .Net)


Get Filename from URL


Public Function GetFileNameFromURL(ByVal URL As String) As String
        Try
            Return URL.Substring(URL.LastIndexOf("/") + 1)
        Catch ex As Exception
            Return URL
        End Try
End Function 

No comments: