First Extension method error

Thread is closed for posting
4 posts, 0 answers
  1. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 12 Jun 2012 Link to this post

    Hi:
    I was getting the following:
    Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)

    Source Error:
    Line 3: }
    Line 4: <h2>TabStrip2</h2>
    Line 5: @(Html.Kendo().TabStrip()
    Line 6: .Name("tabstrip")
    Line 7: .Items(tabstrip =>

    Solution: Added
    <configSections>
      <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
        <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      </sectionGroup>
    </configSections>
    and:
    <system.web.webPages.razor>
      <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>
    To my web config file.
    Phil
  2. Manik
    Manik avatar
    3 posts
    Member since:
    Jun 2012

    Posted 19 Jun 2012 Link to this post

    I have the same error, I followed the steps provided in http://www.kendoui.com/documentation/asp-net-mvc/introduction.aspx but still I'm getting the same error.  How to resolve this?
  3. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 23 Jun 2012 Link to this post

    Hi:

    The attached file is my web config file.  I can also mention that http://www.codeproject.com/ has some information.  Finally, I used the following sample http://kendouiaspnetsamples.codeplex.com/releases/view/88762 (and others).

    Phil
  4. Kushal
    Kushal avatar
    12 posts
    Member since:
    Aug 2012

    Posted 22 Aug 2012 Link to this post

    @Phil's Solution helped me... Thanks...

    I was missing following line in webconfig

    <add namespace="Kendo.Mvc.UI" />
Back to Top