This is a migrated thread and some comments may be shown as answers.

First Extension method error

3 Answers 1410 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phil
Top achievements
Rank 2
Phil asked on 13 Jun 2012, 01:48 AM
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

3 Answers, 1 is accepted

Sort by
0
Manik
Top achievements
Rank 1
answered on 19 Jun 2012, 09:08 PM
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?
0
Phil
Top achievements
Rank 2
answered on 23 Jun 2012, 02:57 PM
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
0
Kushal
Top achievements
Rank 1
answered on 22 Aug 2012, 12:08 PM
@Phil's Solution helped me... Thanks...

I was missing following line in webconfig

<add namespace="Kendo.Mvc.UI" />
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 2
Answers by
Manik
Top achievements
Rank 1
Phil
Top achievements
Rank 2
Kushal
Top achievements
Rank 1
Share this question
or