I have a view with a form, when user submit the form, the matched action method is like:
public ActionResult Test(ViewModel vm, Member member)
{
//...
if (ModelState.IsValid)
{
try{
//...
member.OID = 1; //error here
//...
}Catch(Exception ex)
{
//...
}
}
}
It works fine before, but now I get error as below when assigning the value to a object property: Operation is not valid due to the current state of the object
why? how to resolve it?