Apologise: Download excel file for safari using with c#
ONCE UPON A TIME DOWNLOAD MP4 FREE | |
FREE ESL VIDEOS FOR BEGINNERS DOWNLOAD | |
PIXEL REALITY DOWNLOAD PC | |
FREE 3D LOVE HEART DOWNLOADS |
Download file works for all browsers except Safari[Answered] RSS
I have a web page that displays a ListView control populated with rows that contain a path to files that can be downloaded. When a link on the listview is clicked, that file will be downloaded to the user's PC. This works for all browsers we tested except Safari on a mac. Here is the code of the SelectedIndexChanged event:
protected void lvDownloads_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { string sId; sId = lvDownloads.DataKeys[e.NewSelectedIndex].Value.ToString(); System.Web.HttpContext context = System.Web.HttpContext.Current; string ipAddress = Convert.ToString(context.Request.ServerVariables["REMOTE_ADDR"]); Int32 iDownloadId = 0; iDownloadId = Convert.ToInt32(sId); string filePath = Convert.ToString(SqlHelper.ExecuteScalar(connStringHG, "GetDownloadsById", iDownloadId)); Response.ContentType = ContentType; Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(@filePath)); Response.WriteFile(@filePath); Response.End(); }On the mac, it puts .Html at the end of the file name. Is there anyway to modify this code so that it works on the mac as well?
-
-