AI OnAI Off
Hi,
Had the same problem. Added EPiServer.Shell.Web.Mvc.Html as a global import directive in Web.config.
This needs to be in your main Web.config file and not the one in the Views folder.
It should look something like this:
<configuration> <system.web> <pages validateRequest="false" enableEventValidation="true" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" enableViewState="false"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> <add namespace="EPiServer.Shell.Web.Mvc.Html" /> <!-- This line needs to be added --> </namespaces> </pages> </system.web> </configuration>
/Jakob
I have a strange error on the use of Xforms in Episerver 9..
I made a Block which renders a form, so you can implement it in every page in a contentarea. Now all good until now, sadly recently i get a 'bizarre' error:
"CS1061: System.Web.Mvc.HtmlHelper bevat geen definitie voor Translate......"
This means it doesnt contain a function or extensionmethod for 'Translate'. Now that is too bad, but the weird thing is, it refers to the file
'/Util/Views/Shared/DisplayTemplates/XForm.ascx ' and refers to an error on line 8:
However, I work strictly with MVC and not webforms, so i'm surprised about this ascx usercontrol and when i look for this file (and even the use of html.translate) it's nowhere to be found???
How can i solve this?