Error in first porject during setting up

2 posts, 0 answers
  1. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 12 Mar 2013 Link to this post

    Error 5 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' could be found (are you missing a using directive or an assembly reference?) c:\VSProjects\SOH.Orthodontics\SOH.Orthodontics.Web.UI\Views\Patient\PatientResult.cshtml 5 8 SOH.Orthodontics.Web.UI

    Really struggling with this error.  Please help!  Html.Kendo() in the razor view just is not recognised!  Argh!!

    Added a reference to the dll and also added namespace to BOTH web.config files.  Sections below from both files.

      <system.web.webPages.razor>
        <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <pages pageBaseType="System.Web.Mvc.WebViewPage">
          <namespaces>
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Routing" />
            <add namespace="Kendo.Mvc.UI" />
          </namespaces>
        </pages>
      </system.web.webPages.razor>


        <pages>
          <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="Kendo.Mvc.UI" />
          </namespaces>
        </pages>
  2. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 13 Mar 2013 Link to this post

    By closing Visual Studio and opening it again, I appear to have fixed the issue.
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top