protected override void OnInit(EventArgs e) { base.OnInit(e); hlNewFile.NavigateUrl = Selection.ActionUrl("upload"); ancestors = Find.EnumerateParents(Selection.SelectedItem, null, true).Where(a => a is AbstractNode).Reverse(); Reload(); Refresh(Selection.SelectedItem, ToolbarArea.Navigation); btnDelete.Enabled = Engine.SecurityManager.IsAuthorized(User, N2.Security.Permission.Publish); }
protected void Page_Load(object sender, EventArgs e) { hlCancel.NavigateUrl = Selection.ActionUrl("info"); try { var config = ConfigurationManager.GetSection("system.web/httpRuntime") as HttpRuntimeSection; maxFileSize = config.MaxRequestLength * 1024 - 10000; } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex); } }