if (Page.IsPostBack){
Response.ContentType="application/ms-word";
Response.AddHeader( "content-disposition","attachment; filename=download.doc");
FileStream sourceFile = new FileStream(@"d:SRS_Inventory_Phase1_v1.02.doc", FileMode.Open);
long FileSize;
FileSize = sourceFile.Length;
byte[] getContent = new byte[(int)FileSize];
sourceFile.Read(getContent, 0, (int)sourceFile.Length);
sourceFile.Close();
Response.BinaryWrite(getContent);
}
}
1 comment:
Important codings. Like that. Thank You!
STC Technologies|STC Technologies
Post a Comment