1

I am migrating existing MVC application to the ASP.NET Core MVC application using SDK netcoreapp2.2.

I am using some custom razor helper in that, but dotnetcore2.2 doesn't support @helper keyword.

showing error like

error RZ1002: The helper directive is not supported.

ASP.NET MVC Example:

@helper RenderFeedMappingTable(bool hasMatchesFound,  List<IntelligentFeedMapping> lstIntelligentFeedMappingAll, List<IntelligentFeedMapping> lstIntelligentFeedMapping = null, bool isRoot = true, bool isParentMappingDone = false)
{
    string id = "";
    if (isRoot)
    {
        id = hasMatchesFound ? "tblMatchesFound" : "tblMatchesNotFound";
    }   
    <table><tr><td><input type="text" id="@id"/></td></tr></table>
}
DavidG
  • 113,891
  • 12
  • 217
  • 223
jishan siddique
  • 1,848
  • 2
  • 12
  • 23

0 Answers0