How can you access a PartialView's model, in a View which implements that PartialView?
I'm thinking something along the lines of: Page.FindControl("PartialView-name").Model
.
How can you access a PartialView's model, in a View which implements that PartialView?
I'm thinking something along the lines of: Page.FindControl("PartialView-name").Model
.
A partial view (.ascx) is included from a view (.aspx). If this partial is strongly typed you pass the model from the view so you already have access to it:
<% Html.RenderPartial("~/Views/Shared/SomePartial.ascx", SomeModel); %>