When using VS2013 and creating a new web project (MVC5 / .net 4.5 / EF6) the default project template comes with a standard AccountController that implements the action "Manage". From what I can tell, there's no viewmodel explicitly passed to the Manage view (indeed, the view itself doesn't have a strongly typed model).
The thing is; inside the Manage view is the following line;
@Html.Partial("_ChangePasswordPartial")
When looking at that particular view, it shows a strongly typed viewmodel as;
@model MyProject.Models.ManageUserViewModel
Yet nowhere in the project can I find this viewmodel being populated or sent to that partial view. Can someone tell me WHERE the view is getting this viewmodel from (and where the viewmodel gets constructed)?
The reason is; I am trying to modify the "Manage" view to take my own viewmodel, and then want to pass a property of that viewmodel to the "_ChangePasswordPartial", so it looks something like this:
public ActionResult Manage()
{
CustomViewModel viewModel = bLogic.CreateViewModel();
viewModel.ChangePasswordViewModel = bLogic.CreatePasswordViewModel();
return View(viewModel);
}
And then in my "Manage" view, have:
@Html.Partial("_ChangePasswordPartial", Model.ChangePasswordViewModel)