1 solution

Solution 1

The problem you are having is subtle. The postback Edit overload won't be able to de-serialise the form data back into ModifierUser as binds to items in a list which is a subproperty of Utilisateurs itself. Specifically the new{id=item.IdUser} won't set ModifierUSer.IdUser.
IIRC if you change

using(Html.BeginForm("Edit","Users",new{id=item.IdUser}))

to

using(Html.BeginForm("Edit","Users",new{IdUser=item.IdUser}))

this will populate the value, but I could be mis-remembering what I did (normally I'd check but I'm at work). Additionally, if you are updating this value (and it looks like you are) might be, you are going to have problems distinguishing between the old an new user ids.

There are a few other ways to skin this preserving the old/new id (this same RAZOR as you have currently):