BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
I'm trying to use components in an ASP.NET Core project with .NET 7.
@Html.EJS().TextBoxFor(m => m.Email).Placeholder("Email").FloatLabelType(FloatLabelType.Auto).Render()
If I use @Html.EJS().TextBox("AAA").Placeholder("Email").FloatLabelType(FloatLabelType.Auto).Render() it works fine my If I use TextBoxFor (already used in MVC Standard) and I get this error:
An unhandled exception occurred while processing the request.
Syncfusion.EJ2.TextBoxForExtension.TextBoxFor<TModel, TProperty>(EJ2For<TModel> factory, Expression<Func<TModel, TProperty>> expression, TextBox model, object objHtmlAttr, Dictionary<string, object> htmlAttributes)
LoginGestore.cshtml
Based on the shared information we suspect that you are trying to use the Syncfusion Textbox component in your ASP.Net core project. To use the Syncfusion TextBox component in ASP.Net core, you can follow the documentation provided in the following link.
Online Demo (TextboxFor) : https://ej2.syncfusion.com/aspnetcore/TextBoxes/TextboxFor#/bootstrap5
If you are still encountering issues with the TextBoxFor method, please provide a runnable sample that replicates the issue so that we can test and troubleshoot the issue more efficiently.
If I use tag helpers it works but if I use HTML Helper I have the error.
@Html.EJS().TextBoxFor(m => m.Email).Placeholder("Email").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Auto).Render()
Is it possible to use HTML Helper with viewmodel?
Hi Marco,
We can replicate the issue and logged bug report.
https://www.syncfusion.com/feedback/40523/-net-7-typeloadexception
The fix will be available in weekly release on February 1st week. In meantime, you can use components using tag helpers.
https://ej2.syncfusion.com/aspnetcore/documentation/getting-started/aspnet-core-mvc-taghelper
Regards,
Bharat Ram H
Hi Marco,
We could not include the fix for the reported issue in this weekly release (v20.4.0.49) due to some unavoidable circumstances. However, we have prepared a custom package with a solution in the same version. Please check that from below and let us know.
https://www.syncfusion.com/downloads/support/directtrac/general/ze/customPatch-v20.4.0.49-290803720
It will be included in our next weekly release which is scheduled for February 14th, 2023.
Regards,
Bharat Ram H
Hi Marco,
The fix for the reported issue is included in this weekly release (v20.4.0.50). Please check the link below and let us know if you have any further issues.
https://www.nuget.org/packages/Syncfusion.EJ2.AspNet.Core/20.4.0.50
Regards,
Bharat Ram H