开发者

Sending an anonymous type with RenderPartial

开发者 https://www.devze.com 2022-12-19 17:04 出处:网络
I am trying to send an anonymous type with RenderPartial but this method on开发者_开发知识库ly allows me to

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

精彩评论

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