c# code for downloading a video file
-
i have a web application which have video files. when i am clicking it its get opening in an IE but i want it 2 be downloaded..hw to code it i am working in asp.net 2.0 with C#.plz help me..
-
i have a web application which have video files. when i am clicking it its get opening in an IE but i want it 2 be downloaded..hw to code it i am working in asp.net 2.0 with C#.plz help me..
set the mime type for video.
Response.Content-type = "application/avi"; Response.AddHeader("content-disposition","attachment;filename=sample.avi");
Here i used the video file extension as avi, if you want to change you can do as you wish.the sample.avi is located in application folder in my example, change it to appropriate application relative path. i think this code may be usefull to you. cheers asithangae -
You would have to embed the movie in the page, either using a windows media player/quicktime object or a flash movie player (ala YouTube)
-
set the mime type for video.
Response.Content-type = "application/avi"; Response.AddHeader("content-disposition","attachment;filename=sample.avi");
Here i used the video file extension as avi, if you want to change you can do as you wish.the sample.avi is located in application folder in my example, change it to appropriate application relative path. i think this code may be usefull to you. cheers asithangae -
a user have logged into the site. He when clicks the download button a dialog box should open asking where it should be saved.when he gives a path it should start downloading...hw to code it..
-