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


Please Help Members By Posting Answers For Below Questions

What type of code, client-side or server-side, is found in a code-behind file of a Web page?

579


What is ispostback method in asp.net? Why do we use that?

568


Is it right that ASP.NET Web API has replaced WCF?

503


What is postback in asp net?

562


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?

1942






Can we set which type of comparison we want to perform by the CompareValidator control?

513


What is the life cycle of web page?

521


What is the difference between a candidate key and primary key?

517


What are the media types of http requests and response?

506


What is enableviewstate?

532


How to create discussion forum in asp.net mvc? : Asp.Net MVC

527


Differentiate globalization and localization.

582


Why is xap important?

592


What is _viewstart?

499


What is the difference between globalization and localization?

487