That is kind of what I did. I created a new wwWebPage just for downloading. I have an HREF that points to it and passes the ID of the file that I want to download. The OnLoad reads the URL parameter and downloads the file. Interestingly, the new wwWebPage does not even display. It downloads the file and stays on the current wwWebPage.
Although, your solution reminds me that I wrote a WC app several years ago just for downloading JPEGs that I did not want accessible from the public Web site. I create a script map for .jpg, which points to the WC app.
Sure you can put a button in the grid. You'll need some sort of ID and then just call:
Expression="HREF([MyDownloadFile.ext?id=412312],[Download])"
IOW, you just create a column that includes a link back to the server. The server side code can then run and do the DownloadFile() logic to actually serve the file.
+++ Rick ---
Hi,
I want to display a list of files in a grid, click a row, and call DownloadFile. The files are not accessible via the public Web site; therefore, a standard HREF won't work. Is it possible to put an HREF in a grid that calls a code behind function, passing a parameter? If not, is it possible to put a button in a grid?
Thanks,
David