Spark view engine and ASP.NET MVC 2 strongly Typed Html Helpers


Spark view engine and ASP.NET MVC 2 strongly Typed Html Helpers




I try to use HtmlHelper.TextBoxFor with spark view engine but view crashed with exception "Dynamic view compilation failed. 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'TextBoxFor' and no extension method 'TextBoxFor' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)".

It is my _global.spark:

<use namespace="System"/> <use namespace="System.Linq"/> <use namespace="System.Text" /> <use namespace="System.Web.Mvc"/> <use namespace="System.Web.Mvc.Html"/> <use namespace="System.Web.Routing"/> <use namespace="System.Linq.Expressions" /> <use namespace="MyModels" /> 

In spark-view using: ${Html.TextBoxFor(m => m.UserName)}


Disambiguate controller actions of same name based on result type?

1:

ITextSharp saying File not found when published to My serverasp.net mvc2 - how to get model and model.something in the same way in controller?

86 out of 100 based on 61 user ratings 976 reviews