ASP MVC 3呈现部分字符串

时间:2013-02-15 09:03:11

标签: asp.net-mvc partial-views renderpartial

我正在尝试使用此方法将.ascx文件呈现为字符串

How to Render Partial View into a String

它工作正常。但是,如果我尝试渲染的.ascx文件包含另外的.ascx文件,那么就像这样呈现

<%= Html.Partial("Picture/ProfilePicture", pictureThumb)%>

我得到了例外

View cannot be null

渲染ProfilePicture.ascx

0 个答案:

没有答案