PageRenderTime 3ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/Demo/FileDownload.aspx.cs

http://izwebfilemanager.googlecode.com/
C# | 17 lines | 16 code | 1 blank | 0 comment | 1 complexity | 121d0472ff4dae83c31bad5e2b3dc771 MD5 | raw file
  1. using System;
  2. using System.Web;
  3. using IZ.WebFileManager;
  4. public partial class FileDownload : System.Web.UI.Page
  5. {
  6. protected void Page_Load (object sender, EventArgs e) {
  7. Label1.Text = "";
  8. }
  9. protected void FileManager1_FileDownload (object sender, DownloadFileCancelEventArgs e) {
  10. if(ProhibitDownload.Checked)
  11. {
  12. e.Cancel = true;
  13. Label1.Text = "Downloading file " + HttpUtility.HtmlEncode (e.DownloadFile.PhysicalPath) + " is prohibited.";
  14. }
  15. }
  16. }