internal void RestoreEventValidationState(string fieldValue) { if (!page.EnableEventValidation || fieldValue == null || fieldValue.Length == 0) { return; } IStateFormatter fmt = page.GetFormatter(); eventValidationValues = (int [])fmt.Deserialize(fieldValue); eventValidationPos = eventValidationValues.Length; }
internal string GetEventValidationStateFormatted() { if (eventValidationValues == null || eventValidationValues.Length == 0) { return(null); } Page page = OwnerPage; if (page.IsCallback && !_hasRegisteredForEventValidationOnCallback) { return(null); } IStateFormatter fmt = page.GetFormatter(); int [] array = new int [eventValidationPos]; Array.Copy(eventValidationValues, array, eventValidationPos); return(fmt.Serialize(array)); }