I am trying to get the syncfusion class in the code but it is not appearing in the html helper class. I am using asp.net mvc 9.4 version.
I have added in the top of the cshtml page:
@using Syncfusion.Mvc.Grid;
@using Syncfusion.Mvc.Tools;
@using Syncfusion.Shared.Mvc;
I have added:
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="Syncfusion.Core, Version=9.404.0.62, Culture=neutral, PublicKeyToken=632609B4D040F6B4" />
<add assembly="Syncfusion.Linq.Base, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Shared.Mvc, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Tools.Mvc, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Schedule.Mvc, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="AjaxMin, Version=4.0.202.1, Culture=neutral, PublicKeyToken=24297A69A7EAE424" />
</assemblies>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="Syncfusion.Mvc.Grid" />
<add namespace="Syncfusion.Mvc.Shared"/>
<add namespace="Syncfusion.Mvc.Tools" />
<add namespace="Syncfusion.Mvc.Schedule"/>
</namespaces>
</pages>
<add verb="GET,HEAD" name="MvcResourceHandler" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<httpHandlers>
<add verb="GET,HEAD" path="MvcResourceHandler.axd" type="Syncfusion.Mvc.Shared.MvcResourceHandler, Syncfusion.Shared.Mvc, Version=9.404.0.62, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" validate="false" />
</httpHandlers>
in the webconfig.
but still the Syncfusion intellisense on appear in the page. the controls are getting recognized. in the page, the Rich text editor is showing up.
Hi Digish,
Thanks for using Syncfusion Products.
We suspect that you have not added ‘Syncfusion.Mvc.Shared’ namespaces
under the <namespaces> tag
in Web.config file of Views folder. Could you please check whether you have added
it in Web.config file of Views folder? If not, we suggest you to add the namespaces
under the <namespaces> tag.
Please refer the following code snippets.
Code Snippet:
[Views -> Web.config]
<system.web.webPages.razor>
…
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
…
<add namespace="Syncfusion.Mvc.Shared" />
<add namespace="Syncfusion.Mvc.Tools" />
<add namespace="Syncfusion.Mvc.Grid"
/>
</namespaces>
</pages>
</system.web.webPages.razor>
Please let us know if you have any queries.
Regards,
Alan Sangeeth S