0
votes

I am following Scott Gu's tutorial on ASP.NET MVC 2 model validation: http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx I am using Linq To SQL so tried the buddy class technique. This works fine when using a Create scenerio as in Scott's tutorial. But when used with an edit scenerio I am getting an error InvalidOperationException, the model of type .. could not be updated.

1
Danny... We would have to see more of your code to be able to help, with the information you are providing it is not possible to tell if this is a L2S issue or an MVC2 issue.Roberto Hernandez

1 Answers

0
votes

The error was returned as I did not reset the ViewData when a validation error occurs.