title: ASP.NET MVC: Return different views depending on object type
body: <p>In my controller, I'm generically deserializing Xml. The object being deserialized to could end up being any number of different types. This, of course, won't be known at compile time. I've created a number of partial views, each of which are strongly typed to a different object that is a possible outcome of the Xml deserializaton.</p>
  
  <p>My problem is that I'm struggling with a good way to return the right view. I could always switch on some property in the object, or use a Key/ViewName Dictionary mapping to get the right view name, but I was hoping for something a little more generic than that.</p>
  
  <p>Does anyone know of a way that I could implicitly say, "return the view that is typed off of the object I have."?</p>
  
  <p>Thanks.</p>