开发者

how to call renderpartial from spark

I'm using both spark and .aspx view engines. My partial is in aspx so i'm tring to call from my spark engine.

I've seen something like the following

${Html.RenderPartial("HeaderControl")}

Seems like i'm missing a reference, can't really see what.

Dynamic view compilation failed. d:\Website\Views\Retailer\Index.spark(11,23): error CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'RenderPartial' and no extension method 'RenderPartial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be foun开发者_如何学God (are you missing a using directive or an assembly reference?)

spark

<use namespace="MvcContrib.UI"/>
<use namespace="MvcContrib.UI.Grid"/>
<use namespace="MvcContrib.UI.Pager"/>
<use namespace="MvcContrib.UI.Grid.ActionSyntax"/>
<viewdata model="EStore.Domain.ViewModel.RetailerViewModel"/>


<content name="MainContent">
  ${Html.RenderPartial("HeaderControl")}
</content>


Guess, sorry, because I don't use spark:

<use namespace="System.Web.Mvc.Html"/>

RenderPartial is defined in System.Web.Mvc.Html.RenderPartialExtensions. However I don't generally need to import anything to use it for regular MVC 2.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜