public Dictionary<string, string> GetList() { Dictionary<string, string> res = new Dictionary<string, string>(); try { var controls = new FilesGallery(this.Path, "", "*.ascx").GetAll(); foreach (var item in controls) { string controlName = "PigeonCms." + item.FileNameNoExtension; res.Add(controlName, controlName); } } finally { } return res; }
private void loadGrid() { if (this.Allowed == Utility.TristateBool.True) { var files = new List<FileMetaInfo>(); string searchPattern = ""; if (this.FileNameType == FileNameTypeEnum.ForceFileName && !string.IsNullOrEmpty(this.ForcedFilename)) searchPattern = this.ForcedFilename + ".*"; files = new FilesGallery(FileUpload1.FilePath, "", searchPattern).GetAll(); Grid1.DataSource = files; Grid1.DataBind(); int count = files.Count; if (this.NumOfFilesAllowed > 0 && count >= this.NumOfFilesAllowed) FileUpload1.Visible = false; else FileUpload1.Visible = true; } }