doubts with download files

0

I have a folder in the cloud, and I want to generate a list in the paginal html, with all these files, so that when the user clicks, open the downlaod of the file, I'm trying as follows (this code is test only):

<a href="http://zulex.com.br/upload/CLIDET.DBF" download>                                                   
    <img border="0" src="/images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>

In Chrome it works, it opens the window to download, but in Firefox and IE, the browser tries to open file, instead of opening the download screen, how can I improve this code?

    
asked by anonymous 01.11.2016 / 19:54

1 answer

0
 var files = Directory.GetFiles("C:\path", "*.*",
    SearchOption.AllDirectories)

List<string> imageFiles = new List<string>();
  foreach (string filename in files)
 {
  if (Regex.IsMatch(filename, @".jpg|.png|.gif$"))
    imageFiles.Add(filename);
 }

EM asp MVC or C #, net in asp SEE LINK ve c helps you! link

    
02.11.2016 / 13:26