O
Ollie
The client I am currently working is using a thrid party framework to
generate web content, this framework utilizes asp.net web services I have
written for them, one of these web services streams the contents of file for
download by the end user.
My question is how do I write the following bit of code as pure HTML so that
the web service can return the complete HTML script required to download the
file so that the third party then can display the HTML a they require, hope
this makes sense...
The code lets the user download a txt file when the asp.net page is loaded
or a button is click, but what is the HTML output for this?
FileStream fileStream = new FileStream("C:\\XXXXX\\Test.txt", FileMode.Open,
FileAccess.Read);
long fileSize;
fileSize = fileStream.Length;
byte[] buffer = new byte[(int)fileSize];
fileStream.Read(buffer, 0, (int)fileSize);
fileStream.Close();
Response.ContentType = "application/txt";
Response.AddHeader( "content-disposition", "attachment;
filename=RJL00102.x01");
Response.BinaryWrite(buffer);
Cheers in advance
Ollie
generate web content, this framework utilizes asp.net web services I have
written for them, one of these web services streams the contents of file for
download by the end user.
My question is how do I write the following bit of code as pure HTML so that
the web service can return the complete HTML script required to download the
file so that the third party then can display the HTML a they require, hope
this makes sense...
The code lets the user download a txt file when the asp.net page is loaded
or a button is click, but what is the HTML output for this?
FileStream fileStream = new FileStream("C:\\XXXXX\\Test.txt", FileMode.Open,
FileAccess.Read);
long fileSize;
fileSize = fileStream.Length;
byte[] buffer = new byte[(int)fileSize];
fileStream.Read(buffer, 0, (int)fileSize);
fileStream.Close();
Response.ContentType = "application/txt";
Response.AddHeader( "content-disposition", "attachment;
filename=RJL00102.x01");
Response.BinaryWrite(buffer);
Cheers in advance
Ollie