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.
}
}
}

Signature
khanS
Cowboy (Gregory A. Beamer) - MVP - 26 Aug 2005 14:46 GMT
Use MapPath to get the physical path of the location you wish to save the
file at. You can then save to that path and use a relative path to display
the file.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> private void Button1_Click(object sender, System.EventArgs e)
> {
[quoted text clipped - 21 lines]
> }
> }