Buscar en el sitio

Contacto

Danny

962318754

blackorwhite_dm@hotmail.com

Descargar un fichero

03.11.2010 01:32

odemos descargar un fichero del servidor Web con este código

Dim filepath As String = "c:\test.txt"

Dim filename As String = "test"

Response.Clear()

Response.ContentType = "application/octet-stream"

Response.AddHeader("Content-Disposition", "attachment; filename=" + filename)

Response.Flush()

Response.WriteFile(filepath)

Response.End()