G
Guest
private void Button1_Click(object sender, System.EventArgs e)
{
Context.Response.Clear();
Context.Response.ContentType = "application/octet-stream";
Context.Response.AppendHeader("accept-ranges", "bytes");
Context.Response.AddHeader("Content-Disposition", "attachment; filename=" +
"test.zip");
Context.Response.BufferOutput = false;
Context.Response.Flush();
Context.Response.TransmitFile("c:\\test.zip");
when I use the Physical path it save the file succeesfully in the
destination folder
but when I replace the above Physical path line with the below virtual path
line it dowload the file successfully but with 0 KByte.
Context.Response.TransmitFile("http://test.com/Client/test.zip");
//Context.Response.
}
}
}
{
Context.Response.Clear();
Context.Response.ContentType = "application/octet-stream";
Context.Response.AppendHeader("accept-ranges", "bytes");
Context.Response.AddHeader("Content-Disposition", "attachment; filename=" +
"test.zip");
Context.Response.BufferOutput = false;
Context.Response.Flush();
Context.Response.TransmitFile("c:\\test.zip");
when I use the Physical path it save the file succeesfully in the
destination folder
but when I replace the above Physical path line with the below virtual path
line it dowload the file successfully but with 0 KByte.
Context.Response.TransmitFile("http://test.com/Client/test.zip");
//Context.Response.
}
}
}