I have a ASP.NET MVC 2 webpage in which I render multiple PartialViews of the same type. Each partial view contains a Ajax-form for posting smth. The form consists of:
- an input: EditorFor(m => m.content)
- the validation for the input: ValidationMessageFor(m => m.Content)
The problem is that because there are more than 1 of these forms on the page there is a conflict in the names of the input fields. This I can solve by adding the 'htmlFieldName' property of the EditorFor() overload, but it causes another problem; the validation doesn't work anymore because the name of the input field changed...
Any ideas?