SaaS CMS has officially launched! Learn more now.

@Html.PropertyFor unable to refer



I am unable to refer 

@Html.PropertyFor in my cshtml file. I added all the necessary dlls but cshtml is not recognizing the syntax.  Is there anything else I can verify?

Anyone else faced the issue? I am using EPI 7.11 version.

This is the error I am getting
CS1061'HtmlHelper' does not contain a definition for 'PropertyFor' and no extension method 'PropertyFor' accepting a first argument of type 'HtmlHelper'
could be found (are you missing a using directive or an assembly reference?)StartPage\Index.cshtml

I have the below package added to the project.

Jun 04, 2016 4:25

Check that you have added the namespace in /views/web.config (or have a @using statement in your .cshtml)

    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="EPiServer.Web.Mvc.Html" />
        <add namespace="EPiServer.Shell.Web.Mvc.Html" />

The PropertyFor extension method in in EPiServer.Web.Mvc.Html

Jun 04, 2016 10:09

yes. When I added the reference inside View->Web.config it worked. Thank you

Jun 05, 2016 5:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.