My viewmodel has a property called Recipient. That has a Property called MobileNumber
I’m trying this in MVC 2:
UpdateModel(viewmodel, new[] { "Recipient_MobileNumber" }); // I expected this to work
I also tried “Recipient.MobileNumber”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
Your problem is your using the string[] includes as view data expressions which would hypothetically hop around the object graph to model bind what you need.
UpdateModel doesn’t work that way. Those strings are simply used as filters over properties.