PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 39ms 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
 1using System;
 2using System.Web;
 3using IZ.WebFileManager;
 4
 5public partial class FileDownload : System.Web.UI.Page
 6{
 7	protected void Page_Load (object sender, EventArgs e) {
 8		Label1.Text = "";
 9	}
10	protected void FileManager1_FileDownload (object sender, DownloadFileCancelEventArgs e) {
11		if(ProhibitDownload.Checked)
12		{
13			e.Cancel = true;
14			Label1.Text = "Downloading file " + HttpUtility.HtmlEncode (e.DownloadFile.PhysicalPath) + " is prohibited.";
15		}
16	}
17}