I have an area in my mvc project and this area has some display templates. If I use @Html.DisplayFor(x => Model.Image) I want to use the display template from my are for the Image. How can I configure my view engine so it also looks inside my area for the specific partial view?
Asked
Active
Viewed 281 times
1 Answers
0
You can create your view at Areas/AreaName/Views/Shared/DisplayTemplates/MyImage.cshtml

archil
- 39,013
- 7
- 65
- 82
-
That's where I have my templates but it does not use it, I need to put it in ~/Views/Shared/DisplayTemplates/Image.cshtml – marcus Mar 31 '12 at 15:58
-
What is the type of Model.Image? – archil Mar 31 '12 at 16:23
-
the type is SomeNameSpace.Image, I don't know if the problem is that my AreaName is Dashboard but the area directory name is /Areas/MyApp.UI – marcus Mar 31 '12 at 16:49
-
Is it not possible or what am I missing? – marcus Apr 09 '12 at 14:27