Để thực hiện được chức năng download nhiều file trong dotnetnuke. Ta làm như sau:
+ các file cần download hiển thị dưới dạng hyperlink, gửi FileId (thuộc tính trong bảng Files của dotnetnuke), link tới trang download
+ Tạo trang download. Trang này lấy ra FileId từ tham số, sau đó viết đoạn code sau trong hàm Page_Load
if (Request["FileId"] != null)
{
int id = int.Parse(Request["FileId"].ToString());
FileSystemUtils.DownloadFile(PortalId, id, false, true);
}
Thư viện bạn có thể tham khảo tại đây:
http://www.dotnetnukeru.com/dnndocs/api/html/T_DotNetNuke_Common_Utilities_FileSystemUtils.htm