I try to download a file in javascript, passing filename from html
HTML:
<img border="0" src="/Content/Images/Icons/color-16/disk-return-black.png" width="20" height="18" style="cursor: pointer" onclick="downloadDocFoto('@item.CaminhoDocFoto')" id="btnDownloadDocFoto_Contrato">
Javascript:
function downloadDocFoto(NomeDocFoto) {
alert(NomeDocFoto);
var url = '~/App_Data/uploads/' + NomeDocFoto + '';
}
the var url have the path where files stay, and the filename