If i got view which inherits from:
System.Web.Mvc.ViewPage<Foo>
Where Foo has a property Bar with a type string
And view wants to render strongly typed partial view which inherits from:
System.Web.Mvc.ViewUserControl<string>
like this:
Html.RenderPartial("_Bar", Model.Bar);%>
Then why it will throw this:
The model item passed into the dictionary is of type 'Foo'
but this dictionary requires a model item of type 'System.String'.
when bar is not initialized?
More specific: why it passes Foo, where it should pass null?