Lorsque j'essaie de rendre une vue partielle dont le modèle type est défini comme suit:
@model dynamic
en utilisant le code suivant:
@{Html.RenderPartial("PartialView", Model.UserProfile);}
J'obtiens l'exception suivante:
'System.Web.Mvc.HtmlHelper<dynamic>' has no applicable method named 'RenderPartial' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
Cependant, le même code dans un .fichier aspx fonctionne parfaitement. Toutes les pensées?