
18/11/2004, 16:24
|
| | Fecha de Ingreso: octubre-2004
Mensajes: 27
Antigüedad: 20 años, 4 meses Puntos: 0 | |
lo puedes hacer con un input:(codigo html)
<INPUT class="search" id="File1" type="file" name="File1" runat="server">
previa tienes q importar: Imports System.IO
y para hacer referencia a este lo haces asi:
Dim Tipo As String = Right(Path.GetFileName(File1.PostedFile.FileName), 3)
If Tipo = "jpg" Or Tipo = "gif" Or Tipo = "jpeg" Then
Dim Destino As String = "..\Programacion\Imagenes\" & Path.GetFileName(File1.PostedFile.FileName)
File1.PostedFile.SaveAs(Destino)
Dim dr As IDataReader = Clscentros.AdjuntaImagen(Request.QueryString("prog rama"), Path.GetFileName(File1.PostedFile.FileName))
Response.Redirect("agregaimagen.aspx")
End If
y listo ya anexas pero esa carpeta donde subes el archivo tiene q trener los permisos de escritura.
ojala te sirva! |