Jump to content

webpage with mp3 files which will be ready for download


sheryi26

Recommended Posts

hi,I am working on the website, it has some mp3 files and we want users can download mp3 files when they click on the mp3 files link...it has done until last week! but now after cliking the links of mp3 files it is directly opened in windows media player program and buffered there.how can I have the first mood, opening the "save as" window for downloading the files after clicking the mp3 files links ?http://www.baharmovahed.com/bahar-music-ca...e/audio-en.html

Link to comment
Share on other sites

  • 3 weeks later...

Finally I found the solution of the problem of my asp.net 2008 web application...it has ability of downloading mp3 files by helping of this page: http://www.west-wind.com/weblog/posts/76293.aspxit is working properly in my localhost, but after uploading it on the web, error page has been displayed!can anyone help me?<asp:Button runat="server" Text="Download" ID="Button1" onclick="Button1_Click" /> protected void Button1_Click(object sender, EventArgs e){Response.Clear();Response.ContentType = "audio/mpeg3";Response.AppendHeader("content-disposition", "attachment; filename=test1.mp3");Response.TransmitFile(Server.MapPath("test.mp3")); Response.End(); }

Link to comment
Share on other sites

dear friend, thanks for your reply...I uploaded the project file in a folder of one of my websites...that website is working base on asp.net,but it is not working and have this undefined error even after changing customErrors mode to "Off"!Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...