The value for a object inside a viewmodel lost on redirect to action in asp.net mvc 2.0?
问题 I have a view model - public class MyViewModel { public int id{get;set;}; Public SomeClass obj{get;set;}; } public class SomeClass { public int phone{get;set;}; public int zip{get;set;}; } So on my controller when I post back MyViewModel it has all the values for all the fields...but when I do return RedirectoAction("SomeAction",vm);//where vm->MyViewModel object that has all values... it loses the values for SomeClass object?...can anyone please help me out 回答1: The second argument to