How to get file path within VB class - assuming our VB class in located in code behind file of ASP.net webpage?
e.g. We are viewing ASP.net webpage ( http://localhost:1253/website/web-page.aspx
) - and our VB class in located in web-page.aspx.vb
file.
Public Class FileLocation
Public Function GetFileLocation() As String
Dim location as string = '
// get "c:/intenpub/website/file.jpg" when only filename "file.jpg" is known
Return location
End Function
End Class