I have a repeater with Remove buttons (LinkButton). Expensive database calls determine if a row can be removed (weird and not ideal, I know). In each row, I've got a CustomValidator that has a OnServerValidate event hander.
The problem is that I don't know which RepeaterItem the user is attempting to remove during the multiple calls to CustomValidator.OnServerValidate() event. If I had this information, I could filter the validation to the exact row the user is trying to remove.
For now, I've unsubscribed from CustomValidator.OnServerValidate and hacked it together so Repeater.OnItemCommand gathers the RepeaterItem and passes it into a validation method that sets CustomValidator.IsValid after the database validation. This works, but seems lame. There has got to be a way to keep my validation code in my validator.
Thanks in advance for any help.