Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/03/2005, 23:21
Anerol
 
Fecha de Ingreso: octubre-2004
Ubicación: Santiago Chile
Mensajes: 119
Antigüedad: 20 años, 5 meses
Puntos: 0
inclui :
Imports System.IO

puse en un apgain aspx un componente
<form id="Form1" method="post" runat="server">
<P><input type="file" id="file1" runat="Server" class="search" NAME="file1"></P>
<P><asp:Button id="btnUpload" runat="server" Text="Subir"></asp:Button></P>
<P><asp:Label id="Mensaje" runat="server"></asp:Label></P>
</form>

y en el evento click del boton
Dim rut_alumno As String
rut_alumno = "13265724-6"
Dim ext As String
Dim TargetPath = "c:\Inetpub\wwwroot\subido\" & rut_alumno & ".jpg" 'lorena.jpg" '& Path.GetFileName(txtUpload.PostedFile.FileName)
ext = Right(Path.GetFileName(txtUpload.PostedFile.FileNa me), 3)
txtUpload.PostedFile.SaveAs(TargetPath)


ESO, en realidad un amigo que hizo lo mismo que yo le funciono, pero ami me sale ese error

Ojala se te ocurra algo