1
votes

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 found (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>
1

1 Answers

0
votes

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.