I am trying to send an anonymous type with RenderPartial but this method on开发者_开发知识库ly allows me to send (string, object , viewDataDictionary) or (string) or (string, object).
I am using MVC 1.0. Is there something I am missing here ?
Here is what I am trying to get workijng :
<% Html.RenderPartial("ProductDisplay", product, new { DisplayAddToCartButton = false }); %>
Thanks for your help
Try:
<% Html.RenderPartial("ProductDisplay", product, (new ViewDataDictionary { { "DisplayAddToCartButton", false } })); %>
精彩评论