I want to pass an object Model.AvailableVerticalType
along with the
expression
and templateName
in the call to the HTML Helper DisplayFor
.
Without passing the object, the DisplayFor()
syntax looks like this:
@Html.DisplayFor(o => offer, MVC.Shared.Views.DisplayTemplates.OfferDetail)
The OfferDetail
template accepts an object of the type Offer
only:
@model DGS.DGSAPI.UI.BusinessModels.Offer
So I need a way to send the AvailableVerticleType
through the ViewData
. Is it possible? What would be the syntax for passing ViewData
in DisplayFor()
?