User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,617 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,273 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 633 | Replies: 6 | Solved
Reply
Join Date: Jan 2008
Location: istanbul
Posts: 265
Reputation: serkansendur is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 23
serkansendur's Avatar
serkansendur serkansendur is offline Offline
Posting Whiz in Training

How to create download links for media files?

  #1  
May 18th, 2008
I dont want the windows media player automatically open the wmv files as streaming videos. I want the wmv links to open as download dialog boxes. I know one approach is to zip the wmv files but i dont want this. How can i achieve this?
Serkan Şendur
MCAD.NET
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: How to create download links for media files?

  #2  
May 18th, 2008
Could you try adding the files to the server and then pointing a hyperlink to them to download them or must you have a download box?
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Jan 2008
Location: istanbul
Posts: 265
Reputation: serkansendur is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 23
serkansendur's Avatar
serkansendur serkansendur is offline Offline
Posting Whiz in Training

Re: How to create download links for media files?

  #3  
May 18th, 2008
if you point a media file in the format of .wmv the windows media player automatically plays them. I dont want that happen, i want the download dialog box to open.
Serkan Şendur
MCAD.NET
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: How to create download links for media files?

  #4  
May 18th, 2008
Right I see, I remember once I tried to do this. That was a while back mind, and I didn't find a solution. However, I will do some research, hold on..
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Join Date: Jan 2008
Location: istanbul
Posts: 265
Reputation: serkansendur is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 23
serkansendur's Avatar
serkansendur serkansendur is offline Offline
Posting Whiz in Training

Re: How to create download links for media files?

  #5  
May 18th, 2008
i know that it is possible, i searched for sample wmv downloads and i have seen many links that automatically opens as download dialog boxes.
Serkan Şendur
MCAD.NET
Reply With Quote  
Join Date: Jan 2008
Location: istanbul
Posts: 265
Reputation: serkansendur is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 23
serkansendur's Avatar
serkansendur serkansendur is offline Offline
Posting Whiz in Training

Re: How to create download links for media files?

  #6  
May 18th, 2008
i have found it at the following address : http://www.dotnet247.com/247referenc...30/152516.aspx

string filename = "C:\MyFolder\MyFile.xyz";

System.IO.FileInfo file = new System.IO.FileInfo(fileName);

Response.Clear(); // clear the current output content from the buffer

Response.AppendHeader("Content-Disposition", "attachment; filename=" + file.Name);

Response.AppendHeader("Content-Length", file.Length.ToString());

Response.ContentType = "application/octet-stream";

Response.WriteFile(file.FullName);

Response.End();
Serkan Şendur
MCAD.NET
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 47
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: How to create download links for media files?

  #7  
May 19th, 2008
Great, Im glad you found it - thanks for sharing!
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 1:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC