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

Cannot use Kendo within areas

1 Answer 1149 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Owen
Top achievements
Rank 1
Owen asked on 17 Jan 2018, 04:44 PM

Hi, 

Hope someone can help me out with this. 

I have created a new project in which I have successfully added Telerik UI ASP.Net MVC. I can use the following code in the index view of my project: 

@(Html.Kendo().DatePicker().Name("datepicker"))

 

However my issue is that I have split my project into areas, and for some reason the code above doesn't work in the index views in these areas. I get an Compilation error that reads:

"HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?"

Do I need to add additional references somewhere in these areas?

Appreciate any help, thanks.

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 18 Jan 2018, 11:17 AM
Hello Owen,

I have provided and answer in your support ticket on the same topic. I would suggest to continue our communication there in order to prevent thread duplication. 

For anyone else that is experiencing the same issue - in order to enable the Telerik UI for MVC HtmlHelpers in newly created MVC areas, the following steps have to be followed:

  • Reference the required Kendo scripts and styles in the Layout file of the area.

  • Reference the Kendo.Mvc.UI namespace in the web.config file inside the views folder of the area (usually located in Areas/AreaName/Views/web.config).

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Owen
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or