Replacement for @helper in ASP.NET Core

后端 未结 8 1549
傲寒
傲寒 2020-11-30 06:35

So far, i don\'t think ViewComponent solves that neither does TagHelper. Is there any replacement to this? Something that takes parameters and retu

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 06:46

    The @helper directive was removed since it was incomplete and its current design did not fit in the new 'ASP.NET 5 way'. One of the reasons is that helpers should be declared in the App_Code folder while ASP.NET 5 has no concept of special folders. Therefore the team decided to temporarily remove the feature.

    There are plans to bring it back in the future though. See this and this.

提交回复
热议问题