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()