void RaisePostBackEvent(string eventArgument) { if (eventArgument == "Upload") { HttpPostedFile uploadedFile = Page.Request.Files[ClientID + "_Upload"]; if (uploadedFile != null && uploadedFile.ContentLength > 0) { FileManagerItemInfo dir = GetCurrentDirectory(); Controller.ProcessFileUpload(dir, uploadedFile); } } else if (eventArgument == "Select") { if (SelectCommand != null) SelectCommand.Invoke(this, EventArgs.Empty); } else if (eventArgument == "Cancel") { if (CancelCommand != null) CancelCommand.Invoke(this, EventArgs.Empty); } else if (eventArgument.StartsWith("Toolbar:", StringComparison.Ordinal)) { int i = int.Parse(eventArgument.Substring(8)); CustomToolbarButton button = CustomToolbarButtons[i]; OnToolbarCommand(new CommandEventArgs(button.CommandName, button.CommandArgument)); } }