我不能在asp核心中使用Steve Anderson的BeginCollectionItem.使用时我在局部视图中出现错误
I cannot use BeginCollectionItem by Steve Anderson in asp core. I got an error in my partial view when I use
@using (Html.BeginCollectionItem("Entries")) { }在未引用的程序集中定义了"HtmlHelper"类型.您必须添加对程序集'System.Web.Mvc,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的引用.
The type 'HtmlHelper' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
是否有另一种方法可以在ASP核心中实现BeginCollectionItem的功能?
is there an alternative way to achieve the functionality of BeginCollectionItem in ASP core?
推荐答案我移植了原始的BeginCollectionItem以便与.net Core和.Net Framework 4.6+上的ASP.Net Core一起使用.
I ported the original BeginCollectionItem to work with ASP.Net Core on .Net Core and .Net Framework 4.6+.
www.nuget/packages/BeginCollectionItemCore
更多推荐
在ASP.net Core中使用BeginCollectionItem
发布评论