We are working in a project where Spark view engine has been used. We are updating the framework and version of the project. After updating the version we are getting error "The name Html doesn't exists in current context" only in those .spark files where macro is used.
If we remove the macro its working fine.
The actual error is below:
Dynamic view compilation failed. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\d0633734\v3jw2d5u.0.cs(33,24): error CS0103: The name 'HTML' does not exist in the current context
If you override the SparkViewBase
, then you need to make sure you have a method there called HTML
. The default implementation is:
public MvcHtmlString HTML(object value)
{
return MvcHtmlString.Create(Convert.ToString(value));
}