title: Can you use nested view models in ASP.net MVC3?
body: <p>Here is a simplified version of what I am doing.</p>
  
  <p>I have created a view model that contains data for a Company. The company has 3 addresses. So trying to be clever I created an AddressViewModel and an _address partial.</p>
  
  <p>The problem I have is that while I can pass the AddressViewModel to the partial and it renders the address I now have duplicate id's in the HTML... so there are now three "Line1" input fields on the form which of course don't post back properly.</p>
  
  <p>How can I resolve this issue. Is the only way to really flatten the ViewModel and have,</p>
  
  <p>MainAddressLine1
  MailAddressLine1
  BillAddressLine1</p>
  
  <p>in the company view model? And, if I do this, can I still use the _address partial in some way?</p>