<p>I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the correct type (bar) for the typed user control.</p>

[{'answer_id': 5546, 'author': 'Matt Mitchell', 'author_id': 364, 'author_profile': 'https://Stackoverflow.com/users/364', 'pm_score': 1, 'selected': False, 'text': '<p>What has probably happened is that the object provided when rendering the user control is actually null.</p>\n'}, {'answer_id': 14474, 'author': 'Fredrik Kalseth', 'author_id': 1710, 'author_profile': 'https://Stackoverflow.com/users/1710', 'pm_score': 3, 'selected': True, 'text': "<p>What @MattMitchell said is probably the reason you're seeing this error.</p>\n\n<p>If you want to know <em>why</em>; it is because when you pass null as the controlData parameter when using RenderUserControl(), the framework will try to pass the view data from the current view context onto the user control instead (see UserControlExtensions.DoRendering method in System.Web.Mvc).</p>\n"}]
['https://Stackoverflow.com/questions/5544', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/364/']