protected void lbnDeleteVersions_Click(object sender, EventArgs e)
        {
            FileController fileCtrl = new FileController();
            foreach (GridViewRow row in gridVersions.Rows)
            {
                CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
                if (chkSelect.Checked == false)
                    continue;
                File file = fileCtrl.Get(Int32.Parse(row.Cells[0].Text));

                if (file != null)
                {
                    //check if at least one version exists
                    FileController ctrl = new FileController();
                    List<File> parentFileVersions = ctrl.GetVersions(file.ParentID, UserId, PortalId, PortalSettings.AdministratorRoleId, "");

                    if (parentFileVersions.Count > 1)
                    {
                        //2 or more versions exist, delete version
                        FileConfigurationController configCtrl = new FileConfigurationController();
                        List<FileConfiguration> configs = configCtrl.GetItems(PortalId) as List<FileConfiguration>;
                        fileCtrl.DeleteVersion(file, configs[0].FilesLocation);
                    }
                    else
                    {
                        //1 or fewer versions exist, do not delete and show error message
                        ShowUserErrorMessage("Can't delete last version.  At least one version of the file must exist.");
                    }
                }
            }

            BindVersions(fileCtrl.Get(Int32.Parse(this.Request.QueryString["ID"])));
        }