protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["getLatestEvents"] == "1") { Response.Output.WriteLine(EventUtil.GetLatestEvents()); Response.End(); } //Attached event handlers should be static methods because they are raised out of the context of the host page. //If instance methods are attached (eg. an instance method of Page class), this would cause memory leaks. //Before Events which are fired before the action is started. //Use e.Cancel("message") within a before event handler for canceling the event and displaying a message to the user, //When an event is canceled, the corresponding action will be canceled and the after event will not be fired. fileManager.Expanding += FileManagerExpanding; fileManager.Listing += FileManagerListing; fileManager.Creating += FileManagerCreating; fileManager.Deleting += FileManagerDeleting; fileManager.Renaming += FileManagerRenaming; fileManager.Copying += FileManagerCopying; fileManager.Moving += FileManagerMoving; fileManager.Compressing += FileManagerCompressing; fileManager.Extracting += FileManagerExtracting; fileManager.Uploading += FileManagerUploading; fileManager.Downloading += FileManagerDownloading; fileManager.Previewing += FileManagerPreviewing; //After Events which are fired after the action is completed. fileManager.Expanded += FileManagerExpanded; fileManager.Listed += FileManagerListed; fileManager.Created += FileManagerCreated; fileManager.Deleted += FileManagerDeleted; fileManager.Renamed += FileManagerRenamed; fileManager.Copied += FileManagerCopied; fileManager.Moved += FileManagerMoved; fileManager.Compressed += FileManagerCompressed; fileManager.Extracted += FileManagerExtracted; fileManager.Uploaded += FileManagerUploaded; fileManager.Downloaded += FileManagerDownloaded; fileManager.Previewed += FileManagerPreviewed; fileManager.Failed += FileManagerFailed; }
public IActionResult GetLatestEvents() { return(Content(EventUtil.GetLatestEvents(), "text/html")); }