there is a button in gridview with class FileItemClass.when clicked
it first gets the file path stored in a input control in the gridview
by row.find("td:eq(2) input").val(); then a iframe created and its source
url is set to another file with file path as querystring.in this files page
load event the codes will be written to download files using Page.Response or
other methods for downloading files.
function pageLoad() {
$(".FileItemClass").click(function () {
var iframe = document.createElement("iframe");
var row = $(this).closest("tr");
var annid = row.find("td:eq(2) input").val();
iframe.src = "../FileDownload.aspx?fpath=" + row.find("td:eq(2) input").val();
// This makes the IFRAME invisible to the user.
iframe.style.display = "none";
// Add the IFRAME to the page. This will trigger
//a request to GenerateFile now.
document.body.appendChild(iframe);
return false; //tis magic
});
};