hi,
i wish to know how to download a file in .net.And also explain Response.Transmit()
thank you
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Krishna GaradPosted Mar 23, 2011, 8:26 AM
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=");
BinaryWriter bw = new BinaryWriter(Response.OutputStream);
bw.Write(fileData);
bw.Close();
Response.ContentType = ".wav";
Response.End();
Andrew FensterPosted Mar 23, 2011, 10:51 AM
http://www.c-sharpcorner.com/UploadFile/afenster/5725/?ArticleID=ff6e9173-ab0a-4404-84be-b7e64fef3bf0
As the article shows, there's more than one way to download. Here's how to do it using Response.Transmit, which you asked about:
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=MyFile.pdf");
Response.TransmitFile(Server.MapPath("~/Files/MyFile.pdf"));
Response.End();
As for your "cannot start the converter mswrd632" error, I ran into this once, and this article helped me fix it:
http://helpdeskgeek.com/office-tips/word-cannot-start-the-converter-mswrd632-wpc/
krithika muthukrishnanPosted Mar 23, 2011, 8:49 AM
i download the file but when i want to see the content, the error
word cannot start the converter mswrd632 error will occur how can i solve this