UpdateModel prefix - ASP.NET MVC
- by Kristoffer Ahl
I'm having trouble with TryUpdateModel(). My form fields are named with a prefix but I am using - as my separator and not the default dot.
<input type="text" id="Record-Title" name="Record-Title" />
When I try to update the model it does not get updated. If i change the name attribute to Record.Title it works perfectly but that is not what I want to do.
bool success = TryUpdateModel(record, "Record");
Is it possible to use a custom separator?