I have an Editor Template called "Address.cshtml" that has a model defined as:
@model Acme.Models.Address
In a View I want call the Editor Template and pass a local variable of the same type, and define the name it will use for the variables, I've tried a number of things including:
@Html.Editor("address", "Address", new { Model = address })
How do I pass the model?
Note, I cannot use @Html.EditorFor() because the view uses a different model.
EditorFor(x=> address)if address is variable in view it should work , but I m not sure , technically it should work