I have an EditorFor:
<%: Html.EditorFor(model => model.Client, "ClientTemplate", new { editing = false })%>
This will bind coming down to the view fine (as expected) but will not bind bind back when the model gets posted. This is due to the form id's not being prefixed with "Client."
Usually in this situation i just pass in model and then bind the inputs to model.Client.PropertyName in the Template but this is not an option in this case as the template is used on two different viewmodels (that have client on).
Any suggestions on getting this to bind properly?
Many thanks, Kohan.
Addendum
It seems this was a misunderstanding on my part, the issue as i now understand it is that fluentHtml does not work inside EditorFor Templates. (The same goes for this fix, which as it turns out was not needed as EditorFor will prefix for me automatically if i replace the fluentHtml with normal mvc html helpers)