0

Hello Experts,

I am Developing A Web Project. I have done the given below Code in which I want to download a (.mp3) File from a folder located on my web server.

The given below Code working fine but the problem is that when I run this code on my developing Machine then Downloaded file shows me the 0KB Size.
I have searched much more but in vain.

Thanks in Advance.

Response.Clear()
      Response.ClearContent()
      Response.ContentType = "audio/x-mp3"
      Response.AppendHeader("Content-Disposition", "attachment; filename= Rabba Ishq Na Hoe.mp3")
      Response.TransmitFile("~/Audio/Andaaz/Rabba Ishq Na Hove.mp3")
      Response.Clear()
      Response.Flush()
      Response.End()
2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by __avd
0

Don't invoke Clear method.

Response.Clear()
      Response.ClearContent()
      Response.ContentType = "audio/x-mp3"
      Response.AppendHeader("Content-Disposition", "attachment; filename= Rabba Ishq Na Hoe.mp3")
      Response.TransmitFile("~/Audio/Andaaz/Rabba Ishq Na Hove.mp3")
      Response.Flush()
      Response.End()
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.