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

How to manage different kinds of sessions in ASP.NET?

775


Explain difference between dataset and datareader?

799


How can we prevent browser from caching an aspx page?

700


What is data grid view in asp.net?

705


What is a form tag?

701


How does session work in asp net?

763


What are sql joins?

758


What is marshalling ? Is it a part of asp.net ?

829


What is asp.net ajax?

728


Describe the events in the life cycle of a web application.

813


Describe the method to create a permanent cookie?

800


What is the concept of view state in asp.net?

773


What is caching? Explain.

741


What is in a session cookie?

718


Distinguish between Server-side and Client-side code with its functionality?

855