We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with Syncfusion ASP.NET MVC 5.0 NuGet Package v15.1.0.41 when set UnobtrusiveJavaScriptEnabled to true

Thread ID:





130045 Apr 18,2017 11:10 AM UTC Apr 19,2017 06:19 AM UTC ASP.NET MVC 1
Tags: General
Krasimir Georgiev
Asked On April 18, 2017 11:10 AM UTC

Hi, I use NuGet packages Suyncfusion.AspNet.Mvc5 v15.1.0.41. Everything is OK when UnobtrusiveJavaScriptEnabled is false in Web.config. But when I set UnobtrusiveJavaScriptEnabled to true I receive this error: "Uncaught ReferenceError: ej is not defined". I addе а reference to ej.unobtrusive.min.js file next to ej.unobtrusive.min.js in _Layout.cshtml.

Please help!

Prince Oliver [Syncfusion]
Replied On April 19, 2017 06:19 AM UTC

Hi Krasimir,   
Thank you for contacting Syncfusion support.   
When unobtrusive Javascript is enabled serialized script to render the control it will be rendered along with the control’s valid tag and it will not be rendered in a separate script section. Hence during page load, this causes the script to render before the ej.web.all.min.js file and other dependent script file loads. In order to overcome the issue, we suggest you to move the script section before the renderbody or place it in the head section.   
    <script src="~/Scripts/ej/web/ej.web.all.min.js"></script> 
    <script src="~/Scripts/ej/common/ej.unobtrusive.min.js"></script> 
    @RenderSection("scripts", required: false) 
    <div class="container body-content"> 
        <hr /> 
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p> 

Refer to following UG link for Getting started through Nuget Packages: https://help.syncfusion.com/aspnetmvc/getting-started#through-nuget-packages 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon