var cd = new ContentDisposition
{
FileName = "file.mp3"
};
Response.AddHeader("Content-Disposition", cd.ToString());
ContentDisposition is a convenient class that allows you to set Content-Disposition in a friendly manner, without knowing the internal components of the HTTP protocol. Of course, you can always adjust the title manually if you want:
Response.AppendHeader("Content-Disposition", "attachment; filename=file.mp3");
source
share