I am wanting to pass something like the following to my view from my controller via GET not POST:
public class MyDTO
{
public string val1 { get; set; }
public string val2 { get; set; }
public MyObject obj { get; set; }
}
public class MyObject
{
public int SomeInt { get; set; }
public string ACoolValue { get; set; }
public string YetAnotherCoolValue { get; set; }
}
And then the controller would like like this. (Note it is a GET):
public ActionResult MyView(MyDTO dto)
{
return View(dto)
}
The problem is that the instance of MyObject is coming back as null, where val1 and val2 have data. Has anyone run across this?