If you want to download video from website use this code.
public void Downlaod()
{
string serverfilepath = "Path of video";
string filename = "downloadvideo.avi";
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
Response.ContentType = "video/x-ms-wmv";
Response.Charset = "utf-8";
Response.HeaderEncoding = UnicodeEncoding.UTF8;
Response.ContentEncoding = UnicodeEncoding.UTF8;
FileInfo fi = new FileInfo(serverfilepath);
if (fi.Exists)
{
using (FileStream fs = fi.OpenRead())
{
Byte[] bytes = new Byte[fs.Length];
fs.Read(bytes, 0, (int)fs.Length);
Response.BinaryWrite(bytes);
}
}
Response.End();
}