This article provides a step-by-step introduction to configure Essential JS 2 setup, build and publish a simple .NET Core web application using the Visual Studio.
Starting with v16.2.0.x, if you reference to Syncfusion assemblies from trial setup or NuGet feed, you should include a license key in your projects. Refer to this link to learn about registering Syncfusion license key in your ASP.NET Core application to use the components.
The official prerequisites to create and run an ASP.NET Core 5.x application on windows environment are described in the .NET Core documentation website.
Open the Visual Studio and click the File menu and select New -> Project option.
Select ASP.NET Core Web Application templates in visual studio 2019.
Change the Application name and then click Create.
Choose .NET Core with ASP.NET Core 5.0 and select ASP.NET Core Web App (Model-View-Controller), and then click Create. The web application project is now created with default ASP.NET Core template.
Add the Syncfusion.EJ2.AspNet.Core
NuGet package to the new application by using the Nuget Packge Manager. Right-click the project and select the Manage Nuget Packages….
Refer to this article to learn more details about installing Essential JS 2 NuGet packages in various OS environment.
Search the Syncfusion.EJ2.AspNet.Core
keyword in the Browser tab and install Syncfusion.EJ2.AspNet.Core NuGet package in the application.
The Essential JS 2 package will be included in the project, after the installation process is completed.
> **Note:** The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies, [`Newtonsoft.Json`](https://www.nuget.org/packages/Newtonsoft.Json/) for JSON serialization and [`Syncfusion.Licensing`](https://www.nuget.org/packages/Syncfusion.Licensing/) for validating Syncfusion license key.
Open ~/Views/_ViewImports.cshtml
file and import the Syncfusion.EJ2
TagHelper.
@addTagHelper *, Syncfusion.EJ2
Add the client-side resources through CDN or local npm package in the <head>
element of ~/Views/Shared/_Layout.cshtml
layout page.
<head>
....
....
<!-- Syncfusion Essential JS 2 Styles -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/material.css" />
<!-- Syncfusion Essential JS 2 Scripts -->
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
</head>
Add the Essential JS 2 Script Manager at the end of <body>
element in the ~/Views/Shared/_Layout.cshtml
layout page.
<body>
....
....
<!-- Syncfusion Essential JS 2 ScriptManager -->
<ejs-scripts></ejs-scripts>
</body>
Now, you can add the Syncfusion Essential JS 2 components in any web page (cshtml
) in the Home
folder.
For example, the calendar component is added to the ~/Views/Home/Index.cshtml
page.
<div>
<ejs-calendar id="calendar"></ejs-calendar>
</div>
Run the application. The Essential JS 2 calendar component will render in the web browser.
The official prerequisites to create and run an ASP.NET Core 3.x application on windows environment are described in the .NET Core documentation website.
Open the Visual Studio and click the File menu and select New -> Project option.
Select ASP.NET Core Web Application templates in visual studio 2019.
Change the Application name and then click Create.
Choose .NET Core with ASP.NET Core 3.1 and select Web Application (Model-View-Controller), and then click Create. The web application project is now created with default ASP.NET Core template.
Add the Syncfusion.EJ2.AspNet.Core
NuGet package to the new application by using the Nuget Packge Manager. Right-click the project and select the Manage Nuget Packages….
Refer to this article to learn more details about installing Essential JS 2 NuGet packages in various OS environment.
Search the Syncfusion.EJ2.AspNet.Core
keyword in the Browser tab and install Syncfusion.EJ2.AspNet.Core NuGet package in the application.
The Essential JS 2 package will be included in the project, after the installation process is completed.
> **Note:** The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies, [`Newtonsoft.Json`](https://www.nuget.org/packages/Newtonsoft.Json/) for JSON serialization and [`Syncfusion.Licensing`](https://www.nuget.org/packages/Syncfusion.Licensing/) for validating Syncfusion license key.
Open ~/Views/_ViewImports.cshtml
file and import the Syncfusion.EJ2
TagHelper.
@addTagHelper *, Syncfusion.EJ2
Add the client-side resources through CDN or local npm package in the <head>
element of ~/Views/Shared/_Layout.cshtml
layout page.
<head>
....
....
<!-- Syncfusion Essential JS 2 Styles -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/material.css" />
<!-- Syncfusion Essential JS 2 Scripts -->
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
</head>
Add the Essential JS 2 Script Manager at the end of <body>
element in the ~/Views/Shared/_Layout.cshtml
layout page.
<body>
....
....
<!-- Syncfusion Essential JS 2 ScriptManager -->
<ejs-scripts></ejs-scripts>
</body>
Now, you can add the Syncfusion Essential JS 2 components in any web page (cshtml
) in the Home
folder.
For example, the calendar component is added to the ~/Views/Home/Index.cshtml
page.
<div>
<ejs-calendar id="calendar"></ejs-calendar>
</div>
Run the application. The Essential JS 2 calendar component will render in the web browser.
The official prerequisites to create and run an ASP.NET Core 2.x application on Windows environment are described in the .NET Core documentation website.
Choose File > New > Project… in the Visual Studio menu bar.
Select ASP.NET Core Web Application and change the application name, and then click OK.
The Essential JS 2 supports 4.5+ .NET Framework in the ASP.NET Core application. i.e. The minimum target framework is 4.5 for Syncfusion ASP.NET Core (Essential JS 2).
Choose .NET Core with ASP.NET Core 2.0 and select Web Application(Model-View-Controller), and then click OK. The web application project is now created with default ASP.NET Core template.
Add the Syncfusion.EJ2.AspNet.Core
NuGet package to the new application by using the Nuget Package Manager. Right-click the project and select Manage NuGet Packages….
Refer to this article to learn more details about installing Essential JS 2 NuGet packages in various OS environment.
Search the Syncfusion.EJ2.AspNet
keyword in the Browse tab and install Syncfusion.EJ2.AspNet.Core NuGet package in the application.
The Essential JS 2 package will be included in the project, after the installation process is completed.
Note: The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies,
Newtonsoft.Json
for JSON serialization andSyncfusion.Licensing
for validating Syncfusion license key.
Open ~/Views/_ViewImports.cshtml
file and import the Syncfusion.EJ2
package.
@addTagHelper *, Syncfusion.EJ2
Add the client-side resources through CDN or local npm package in the <head>
element of the ~/Views/Shared/_Layout.cshtml
layout page.
<head>
....
....
<!-- Syncfusion Essential JS 2 Styles -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/material.css" />
<!-- Syncfusion Essential JS 2 Scripts -->
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
</head>
Add the Essential JS 2 Script Manager at the end of <body>
element in the ~/Views/Shared/_Layout.cshtml
layout page.
<body>
....
....
<!-- Syncfusion Essential JS 2 ScriptManager -->
<ejs-scripts></ejs-scripts>
</body>
Now, add the Syncfusion Essential JS 2 components in any web page (cshtml
) in the Views
folder.
For example, the calendar component is added in the ~/Views/Home/Index.cshtml
page.
<div>
<ejs-calendar id="calendar"></ejs-calendar>
</div>
Run the application. The Essential JS 2 calendar component will render in the web browser.
The official prerequisites to create and run an ASP.NET Core 1.x application on Windows environment are described in the .NET Core documentation website.
Choose File > New > Project… in the Visual Studio menu bar.
Select ASP.NET Core Web Application and change the application name and then click OK.
The Essential JS 2 supports 4.5+ .NET Framework in the ASP.NET Core application. i.e. The minimum target framework is 4.5 for Syncfusion ASP.NET Core (Essential JS 2).
Choose .NET Core with ASP.NET Core 1.0 and select Web Application(Model-View-Controller), and then click OK. Now, the web application project is created with default ASP.NET Core template.
Add the Syncfusion.EJ2.AspNet.Core
NuGet package to the new web application by using the Nuget Package Manager. Right-click the project and select Manage NuGet Packages….
Refer to this article to learn more details about installing Essential JS 2 NuGet packages in various OS environment.
Search the Syncfusion EJ2.AspNet
keyword in the Browse tab and install Syncfusion.EJ2.AspNet.Core NuGet package in the application.
The Essential JS 2 package will be included in the project, after the installation process is completed.
Note: The Syncfusion.EJ2.AspNet.Core NuGet package has dependencies,
Newtonsoft.Json
for JSON serialization andSyncfusion.Licensing
for validating Syncfusion license key.
Open the ~/Views/_ViewImports.cshtml
file and import the Syncfusion.EJ2
package.
@addTagHelper *, Syncfusion.EJ2
Add the client-side resources through CDN or local npm package in the <head>
element of ~/Views/Shared/_Layout.cshtml
layout page.
<head>
....
....
<!-- Syncfusion Essential JS 2 Styles -->
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/material.css" />
<!-- Syncfusion Essential JS 2 Scripts -->
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>
</head>
Add the Essential JS 2 Script Manager at the end of <body>
element in the ~/Views/Shared/_Layout.cshtml
layout page.
<body>
....
....
<!-- Syncfusion Essential JS 2 ScriptManager -->
<ejs-scripts></ejs-scripts>
</body>
Now, add the Syncfusion Essential JS 2 components in any web page (cshtml
) in the Views
folder.
For example, add the calendar component in the ~/Views/Home/Index.cshtml
page.
<div>
<ejs-calendar id="calendar"></ejs-calendar>
</div>
Run the application. The Essential JS 2 calendar component will render in the web browser.