I need to download file from web server, without using save
as dialogue box. Can anyone help, thanks In advance.
Answer Posted / kuldeep
for save as dialoge box use this code
Response.ClearContent();
//give file type
Response.ContentType = "video/.wmv";
Response.AddHeader("content-disposition", "attachment;
filename=download.wmv");
string filename1 = @"E:\xyz.wmv";
Response.TransmitFile(filename1);
but if you need to download file without user interaction
then please refer to this link
http://www.devarticles.com/c/a/ASP.NET/HTTP-File-Download-
Without-User-Interaction-Using-.NET/
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What type of code, client-side or server-side, is found in a code-behind file of a Web page?
What is ispostback method in asp.net? Why do we use that?
Is it right that ASP.NET Web API has replaced WCF?
What is postback in asp net?
Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?
Can we set which type of comparison we want to perform by the CompareValidator control?
What is the life cycle of web page?
What is the difference between a candidate key and primary key?
What are the media types of http requests and response?
What is enableviewstate?
How to create discussion forum in asp.net mvc? : Asp.Net MVC
Differentiate globalization and localization.
Why is xap important?
What is _viewstart?
What is the difference between globalization and localization?