Cannot use Actionlink in spark files.

141 views
Skip to first unread message

Stephen

unread,
Jul 4, 2009, 2:21:47 AM7/4/09
to Spark View Engine Dev
In my aspx pages, I can succesfully use Html.Actionlink, but when I
attempt it in spark files, it doesnt show up in intellisense, and when
i try to run it anyway, i get:

Dynamic view compilation failed.
c:\Users\midas\Documents\Visual Studio 2008\Projects\ChurchMVC
\ChurchMVC\Views\Home\Index.spark(73,25): error CS1061:
'System.Web.Mvc.HtmlHelper' does not contain a definition for
'ActionLink' and no extension method 'ActionLink' accepting a first
argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you
missing a using directive or an assembly reference?)

I do have system.web.mvc referenced, and I have added <use
namespace='System.web.mvc'/> in _global.spark.
None of that helps. Any ideas?

Rei Roldán

unread,
Jul 4, 2009, 11:03:20 AM7/4/09
to spar...@googlegroups.com
this is where the helpers live.

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

Stephen

unread,
Jul 5, 2009, 9:58:50 PM7/5/09
to Spark View Engine Dev
That's it exactly. I thought it was covered since the HtmlHelper
object was contained in the System.web.mvc namespace
> > None of that helps. Any ideas?- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages