
05/07/2007, 10:59
|
| | Fecha de Ingreso: febrero-2006
Mensajes: 155
Antigüedad: 19 años Puntos: 0 | |
Re: Comprobar si un archivo existe Problema resuelto
Asi resolvi el problema, Saludos
============================
Protected Sub BuscarFoto(ByVal NEmpleado As String)
Dim strFoto As Boolean
Dim strRutaFoto As String = Server.MapPath("FotosEmpleados\" & NEmpleado & ".jpg")
strFoto = (System.IO.File.Exists(strRutaFoto))
If strFoto = True Then
imgFoto.ImageUrl = "~/Procesos/Usuarios/FotosEmpleados/" & NEmpleado & ".jpg"
Else
imgFoto.ImageUrl = "~/Procesos/Usuarios/FotosEmpleados/SinFoto.jpg"
End If
End Sub |