here is the k# code with the javascript at the top
<script type='text/javascript'>
//download image file from IE
function downloadFile(obj){
var imgFileName = $(obj).attr('src');
var canvas = document.createElement('canvas');
var img = document.createElement('img');
img.onload = function (e) {
canvas.width = img.width;
canvas.height = img.height;
var context = canvas.getContext('2d');
context.drawImage(img, 0, 0, img.width, img.height);
window.navigator.msSaveBlob(canvas.msToBlob(), "'" + imgFileName + "'");
}
img.src = "'" + imgFileName + "'";
}
=============================K#==========================
print("<div id='dvImage' style='width:120px !important;height:auto'>");
if(BrowserInfo.IsIE)
{
print("");
print("<img src='" + doc.ThumbnailUrl + "' style='width:100px !important;height:50px' onclick='downloadFile(this);' />");
print("");
}
else
{
print("<a download='" + doc.Url + "' href='" + doc.Url + "'>");
print("<img src='" + doc.ThumbnailUrl + "' style='width:100px !important;height:50px' />");
print("");
}
print("");
}