protected void PersistenceSaved(object sender, PersistenceEventArgs e) { if (e.PersistenceData == null) { return; } List<string> listIgnoredControlsID = new List<string>() { this.control1.ID }; List<string> listIgnoredPropertiesID = new List<string>() { "prop1", "prop2" }; PersistenceData data = e.PersistenceData; ControlData controlToRemove = null; foreach (string ignoredControlID in listIgnoredControlsID) { controlToRemove = data.Controls.Find(delegate(ControlData controlToFind) { return controlToFind.ControlId == ignoredControlID; }); if (controlToRemove != null) { this.RemovePropertiesFromControl(controlToRemove, listIgnoredPropertiesID); controlToRemove = null; } } this.StoredData = data.ToJson(); } private void RemovePropertiesFromControl(ControlData controlToRemove, List<string> listIgnoredPropertiesID) { PropertyData propertyToRemove = null; foreach (string ignoredPropertyID in listIgnoredPropertiesID) { propertyToRemove = controlToRemove.Properties.Find( delegate(PropertyData propertyToFind) { return propertyToFind.Name == ignoredPropertyID; }); if (propertyToRemove != null) { controlToRemove.Properties.Remove(propertyToRemove); propertyToRemove = null; } } }