I have a page with several kinds of lists that are linked to Linq data sources, and they seem to work very well.
I want to add a check so that when checking the checkbox (IsVoid on the object), comments (VoidedComments on the object) are entered.
Here's the related OnValidate object:
partial void OnValidate(ChangeAction action) { if (action == ChangeAction.Update) { if (_IsVoid) { string comments = this.VoidedComments; if (string.IsNullOrEmpty(this._VoidedComments)) { throw new ValidationException("Voided Comments are Required to Void an Error"); } } } }
Despite the fact that the page has a dynamic validator that references the same ValidationGroup as the dynamic control, when an exception occurs, it gets into JavaScript and the debugger wants to break in. The message is never delivered to the user interface as expected.
Any thoughts on what's going on?
source share