为什么这段代码是正确的:
@{ Html.RenderAction("PostImagesForPost","BlogPost",new { id = Model.ID }); }
而这段代码
@Html.RenderAction("PostImagesForPost",new { id = Model.ID })
通过此错误消息:
Compiler Error Message: CS1502: The best overloaded method match for ‘System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)’ has some invalid arguments
为什么使用'{”}’这么重要?
谢谢