Last post Aug 05, 2010 02:04 AM by Wencui Qian - MSFT
Aug 02, 2010 10:55 PM|icnocop|LINK
You can see a previous post here:
I have been unsuccessfly trying to call the CustomValidation (CustomValidationAttribute) when my page explicitly calls Page.Validate() or when a command is clicked with CausesValidation="true".
I have multiple user controls each with their own DetailView and LinqDataSource on a page and when I submit the page, I explicitly call dv.InsertItem(true) in each user control.
The problem with CustomValidation not getting called when I call Page.Validate() is that I will only get notified of the validation errors in the LinqDataSource.OnInserted event and this is too late for me to cancel inserting so that the DetailsView stays
in Insert mode and still contains the values entered by the user at the time of submission so that the web application allows the user to fix the errors and try again.
Visual Studio 2010
Dynamic Data 4
Linq 2 Sql
asp.net 4.0 dynamicdata linqdatasource DetailsView validation OnValidate DynamicValidator CustomValidation
Aug 05, 2010 02:04 AM|Wencui Qian - MSFT|LINK
Could you be more specified? Thanks.