I am trying to use below code to show a save dialog box when a link with .swf file is clicked, But the problem is that its not working.
Can anyone share the code to show a save dialoge box when a link is clicked with .swf file extention. Please see the below code, I am calling it on htmlanchor click event. Let me know if there are any other soltions..
HtmlAnchor anchor = (HtmlAnchor)sender;
System.IO.FileInfo targetfile = new System.IO.FileInfo(anchor.HRef);
Response.AddHeader("Content-Disposition", "attachment; filename=" + targetfile.Name);
Response.ContentType = "application/x-shockwave-flash";
catch (Exception ex)
Answer: I resolved it by changing this line: Response.ContentType = "application/x-shockwave-flash"; to
Response.ContentType = "application/x-Unknown";
8 years ago