开发者

Sending an anonymous type with RenderPartial

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 } })); %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜