D
dsoltesz
I'm trying to download a local file from the server.
Went I get the save dialog box and save the file, its
saving the current aspx page and not the file I
specified. Here is the code I"m using. Any ideas why
this is happening?
Response.ContentType = "application/x-zip-compressed";
System.IO.FileStream downloadFile = new
System.IO.FileStream
(@"C:\\VirtualCafeSourceSafeCode\\Database.zip",
System.IO.FileMode.Open);
long FileSize;
FileSize = downloadFile.Length;
byte[] getContent = new byte[(int)FileSize];
downloadFile.Read(getContent, 0, (int)
downloadFile.Length);
downloadFile.Close();
Response.BinaryWrite(getContent);
Went I get the save dialog box and save the file, its
saving the current aspx page and not the file I
specified. Here is the code I"m using. Any ideas why
this is happening?
Response.ContentType = "application/x-zip-compressed";
System.IO.FileStream downloadFile = new
System.IO.FileStream
(@"C:\\VirtualCafeSourceSafeCode\\Database.zip",
System.IO.FileMode.Open);
long FileSize;
FileSize = downloadFile.Length;
byte[] getContent = new byte[(int)FileSize];
downloadFile.Read(getContent, 0, (int)
downloadFile.Length);
downloadFile.Close();
Response.BinaryWrite(getContent);