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

Defferable loading initialize script

Thread ID:

Created:

Updated:

Platform:

Replies:

122151 Feb 21,2016 03:35 AM UTC Feb 22,2016 12:13 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Cuong Do
Asked On February 21, 2016 03:35 AM UTC

Hello,
I am quite new to the Syncfusion UI framework. How can I load all initialize scripts on bottom of page?
Is it possible?

Regards,
CD

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On February 22, 2016 12:13 PM UTC

Hi Coung,

You can refer the ej scripts and other scripts just before the ending of the body tag in the _Layout.cshtml page. The ASP.Net MVC Controls will render in two mode Unobtrusive mode and Non-unobtrusive mode. The mode of rendering can be controlled by setting the UnobtrusiveJavascriptEnabled key of the appSettings in web.config. Refer to the following code examples.

Non-unobtrusive mode:

Web.config


  <appSettings>

            . . . .

    <add key="UnobtrusiveJavaScriptEnabled" value="false" />

  </appSettings>


_Layout.cshtml

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>@ViewBag.Title - My ASP.NET Application</title>

    <link rel='nofollow' href="~/Content/ej/web/flat-saffron/ej.widgets.all.min.css" rel="stylesheet" />

</head>

<body>

    @RenderBody()


    <script src="@Url.Content("~/Scripts/jquery-2.1.4.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jquery.easing-1.3.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")"></script>

    <script src="@Url.Content("~/Scripts/ej/ej.web.all.js")"></script>


    @Html.EJ().ScriptManager()

</body>
</html>


Unobtrusive mode:

To initialize the ej scripts in the unobtrusive mode for the deferred loading, use the InitUnobtrusiveInScriptManager key of the appSettings in web.config.

Web.config

 

<appSettings>

         . . . . .

    <add key="UnobtrusiveJavaScriptEnabled" value="true" />

    <add key="InitUnobtrusiveInScriptManager" value="true" />

  </appSettings>


_Layout.cshtml

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>@ViewBag.Title - My ASP.NET Application</title>

    <link rel='nofollow' href="~/Content/ej/web/flat-saffron/ej.widgets.all.min.css" rel="stylesheet" />

</head>

<body>

   

    @RenderBody()


    <script src="@Url.Content("~/Scripts/jquery-2.1.4.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jquery.easing-1.3.min.js")"></script>

    <script src="@Url.Content("~/Scripts/jquery.globalize.min.js")"></script>

    <script src="@Url.Content("~/Scripts/ej/ej.web.all.js")"></script>

    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")"></script>

  @Html.EJ().ScriptManager();

</body>

</html>



Refer to the following Help Documents.

http://help.syncfusion.com/js/dependencies
http://help.syncfusion.com/js/unobtrusive-support
http://help.syncfusion.com/js/api/ejgrid
http://help.syncfusion.com/aspnetmvc/grid/getting-started

Regards,
Seeni Sakthi Kumar S.

CONFIRMATION

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.

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

;