views:

65

answers:

1

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.

A: 

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

Danny