Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 02, 2010 07:48 PM by icnocop
Aug 01, 2010 09:13 PM|LINK
I am experiencing very similar behavior as the post indicated here:
Visual Studio 2010.
Dynamic Data 4
My Site.master page wraps most everything in an UpdatePanel.
When a ValidationException is thrown from a result of OnValidate on the data model, I would have expected Page.IsValid to be false.
In my scenario,
- I am using a DetailsView bound to a LinqDataSource in a UserControl.
- ValidationGroup is not set
When I manually call detailsView.Insert(), I notice OnValidate gets called and throws a ValidationException as expected. The LinqDataSource.Inserted event indicates the exception, but Page.IsValid is still true which is unexpected.
Is this a bug?
Aug 01, 2010 11:05 PM|LINK
I also wanted to mention that my ScriptManager is actually the AjaxToolkit ScriptManager v4.1.40412.
The <asp:CommandField /> I am using to manually call detailsView.InsertItem(true) has CausesValidation="true" .
I would have expected the DynamicValidator in Text_Edit.ascx to catch the exception.
asp.net 4.0 dynamicdata linqdatasource DetailsView validation OnValidate DynamicValidator
Aug 02, 2010 07:24 PM|LINK
With Visual Studio 2008 SP1, ASP.NET 3.5 SP1, DynamicDataFutures0716, and tagMapping ImprovedDynamicValidator, it worked as expected.
But now that I've upgraded to VS2010, ASP.NET 4, and Dynamic Data 4 (removed DynamicDataFutures), it no longer works as expected.
Any troubleshooting advice?
Aug 02, 2010 07:48 PM|LINK
I think I found the answer here:
I will have to use a new ImprovedDynamicValidator for DD4 and ASP.NET 4.