Subir archivos con input="file"
Necesito subir un archivo a mi servidor web, con codigo ASP sin usar componentes......
Gracias .
Gracias .
Estas sirecciones tienen el contenido que necesitas
http://www.programacion.com/asp/
http://www.asptutor.com/asp/default.asp
http://www.aspfacil.com/codigo/
http://www.programacion.com/asp/
http://www.asptutor.com/asp/default.asp
http://www.aspfacil.com/codigo/
Si tu servidor tiene instalado el .NET (NetFramework) prueba de usar esta página (upload.aspx)
<%@ Page Language="VB" Debug="true" %>
<script runat="server">
Sub Button_Click( s As Object, e As EventArgs )
dim n as string, p as integer
n=inpfileup.postedfile.filename
p=instrrev(n,"")
n=mid(n,p+1)
inpFileUp.PostedFile.SaveAs( "f:inetpubwwwrootdownloads"&n )
label1.text="Datos enviados correctamente"
End Sub
</script>
<html>
<head>
<title>HtmlInputFile.aspx</title>
</head>
<body>
<form enctype="multipart/form-data" runat="Server">
<p>
<input id="inpFileUp" type="file" size="60" runat="Server" />
</p>
<p>
<asp:Button id="Button1" onclick="Button_Click" Runat="Server" Text="Enviar"></asp:Button>
</p>
<p>
</p>
<p>
<asp:Label id="Label1" runat="server" enableviewstate="False"></asp:Label>
</p>
</form>
</body>
</html>
<%@ Page Language="VB" Debug="true" %>
<script runat="server">
Sub Button_Click( s As Object, e As EventArgs )
dim n as string, p as integer
n=inpfileup.postedfile.filename
p=instrrev(n,"")
n=mid(n,p+1)
inpFileUp.PostedFile.SaveAs( "f:inetpubwwwrootdownloads"&n )
label1.text="Datos enviados correctamente"
End Sub
</script>
<html>
<head>
<title>HtmlInputFile.aspx</title>
</head>
<body>
<form enctype="multipart/form-data" runat="Server">
<p>
<input id="inpFileUp" type="file" size="60" runat="Server" />
</p>
<p>
<asp:Button id="Button1" onclick="Button_Click" Runat="Server" Text="Enviar"></asp:Button>
</p>
<p>
</p>
<p>
<asp:Label id="Label1" runat="server" enableviewstate="False"></asp:Label>
</p>
</form>
</body>
</html>
