/// <summary> /// Handles the Click event of the btnSave control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void btnNewFolderSave_Click(object sender, EventArgs e) { if (IsValid) { string folder = txtNewFolder.Text; string path = string.Format( CultureInfo.InvariantCulture, Resource.NewObjectPath, _root, folder); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } Folder f = new Folder() { Path = path }; AccessManager.AddFolderKey(f); foreach (Access v in AccessControl1.AccessList) { v.ItemId = f.Id; v.ItemType = ItemType.FileFolder; AccessManager.AddAccess(v); } Refresh(); } }