Unable to use @Html.EJS().Gantt("Gantt") in my project.I add nuget package regarding EJS instead of that this is not working. Will you please help me out.Am unable to use ejs html please help me
What I have tried:
below is the code of web.config
<configuration>
<configsections>
<sectiongroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host">
<section name="pages">
<system.web.webpages.razor>
<host factorytype="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<pages pagebasetype="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc">
<add namespace="System.Web.Mvc.Ajax">
<add namespace="System.Web.Mvc.Html">
<add namespace="System.Web.Routing">
<add namespace="WebApplication4">
<add namespace="Syncfusion.EJ2">
<add namespace="Syncfusion.Mvc.Shared">
<add namespace="Syncfusion.Mvc.Schedule">
<add namespace="Syncfusion.Mvc.Tools">
<add namespace="Syncfusion.JavaScript">
<add namespace="Syncfusion.MVC.EJ">
<appsettings>
<add key="webpages:Enabled" value="false">
<system.webserver>
<handlers>
<remove name="BlockViewHandler">
<add name="BlockViewHandler" path="*" verb="*" precondition="integratedMode" type="System.Web.HttpNotFoundHandler">
<system.web>
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="Syncfusion.EJ2, Culture=neutral">
below is my Web.config
<configuration>
<configsections>
<section name="entityFramework">
<appsettings>
<add key="webpages:Version" value="3.0.0.0">
<add key="webpages:Enabled" value="false">
<add key="ClientValidationEnabled" value="true">
<add key="UnobtrusiveJavaScriptEnabled" value="true">
<system.web>
<compilation debug="true" targetframework="4.7.2">
<httpruntime targetframework="4.7.2">
<runtime>
<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyidentity name="System.Web.Helpers" publickeytoken="31bf3856ad364e35">
<bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0">
<dependentassembly>
<assemblyidentity name="System.Web.WebPages" publickeytoken="31bf3856ad364e35">
<bindingredirect oldversion="1.0.0.0-3.0.0.0" newversion="3.0.0.0">
<dependentassembly>
<assemblyidentity name="System.Web.Mvc" publickeytoken="31bf3856ad364e35">
<bindingredirect oldversion="1.0.0.0-5.2.7.0" newversion="5.2.7.0">
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
="" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warninglevel="4" compileroptions="/langversion:default /nowarn:1659;1699;1701">
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
="" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warninglevel="4" compileroptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+">
<entityframework>
<defaultconnectionfactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb">
<providers>
<provider invariantname="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer">
below is my cshtml page code
<p>
@Html.EJS().Gantt("Gantt").TaskFields(ts =>
ts.Id("Id").Name("Name").StartDate("StartDate").EndDate("EndDate").Duration("Duration")
.Progress("PercentDone").Child("Children").Dependency("Predecessor")).EditSettings(es =>
es.AllowAdding(true).AllowEditing(true).AllowDeleting(true).AllowTaskbarEditing(true)
.ShowDeleteConfirmDialog(true)).Toolbar(new List<string>()
{ "Add", "Edit", "Update", "Delete", "Cancel", "ExpandAll", "CollapseAll"
}).AllowSelection(true).DataSource(ViewBag.datasource).Render()
</p></section></section></section>