Kendo is not defined in Mvc Area

0 Answers 18 Views
General Discussions
Jim
Top achievements
Rank 1
Iron
Jim asked on 19 Mar 2024, 08:08 PM | edited on 19 Mar 2024, 08:09 PM

I am working on a Net Core Mvc application for which I succesfully used Telerik UI. Everything was working fine, but after I added Mvc Areas and moved the views and controllers etc, the Telerik components stopped working.

I have found similar problems searching Google and the Telerik forum. For example:
https://www.telerik.com/forums/cannot-use-kendo-within-areas

However, that solution it not for ASP.NET Core. I was wondering what I have to do to make sure Telerik will work again in my Mvc Areas.

I am using the CDN to include the Kendo files.

<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.3.1114/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.3.1114/js/kendo.aspnetmvc.min.js"></script>
<script src="~/js/kendo-ui-license.js"></script>

<script src="~/vendor/kendo/kendo.culture.nl-NL.min.js"></script>
<script src="~/vendor/kendo/kendo.messages.nl-NL.min.js"></script>
<script type="text/javascript">
    kendo.culture("nl-NL");
</script>
Any help is appreciated.
Jim
Top achievements
Rank 1
Iron
commented on 19 Mar 2024, 08:34 PM

Okay, I found the issue. I suddenly realized the error page didn't show more than just the View I was opening. This made me realize I had not included a ViewStart.cshtml which pointed to the main _Layout.cshtml. So, nothing was actually loaded, which resulted in the (logical) error.

Sorry to bother you. Maybe this will be helpful for someone in future :P

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Jim
Top achievements
Rank 1
Iron
Share this question
or