Jump to content

Force Downloading mp3 files


sheryi26

Recommended Posts

Hi,I am working on a web application...it has ability of downloading mp3 files!it is working properly in localhost, but after uploading it on the web, it is not working and have the undefined error even after changing customErrors mode to "Off"!can anyone help me?<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />protected void Button1_Click(object sender, EventArgs e) { Response.Clear(); Response.ContentType = "audio/mpeg"; Response.AppendHeader("content-disposition", "attachment; filename=gigil.mp3"); Response.TransmitFile(Server.MapPath("test.mp3")); Response.End(); }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...