asp.net-core - 在ASP.net Core中使用BeginCollectionItem

标签 asp.net-core asp.net-core-mvc begincollectionitem

我不能在asp.net核心中使用Steve Anderson的BeginCollectionItem。使用时我的局部 View 出现错误

@using (Html.BeginCollectionItem("Entries")) 
{

}

在未引用的程序集中定义了“HtmlHelper”类型。您必须添加对程序集'System.Web.Mvc,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的引用。

有没有一种替代方法可以在ASP.net核心中实现BeginCollectionItem的功能?

最佳答案

我将原始的BeginCollectionItem移植为可与.Net Core和.Net Framework 4.6+上的ASP.Net Core一起使用。

https://www.nuget.org/packages/BeginCollectionItemCore

关于asp.net-core - 在ASP.net Core中使用BeginCollectionItem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38864912/

相关文章:

Angular 7 与 .net core 2.1 - 针对特定页面启动

mysql - Entity Framework 核心 : Update() method INSERTs instead of UPDATEs on dependent entity

c# - .NET Core 中的环境标记帮助程序

c# - 为什么异常重定向到不同的页面?

c# - iTextSharp 创建的 PDF 仍在使用中

jquery - 使用 jQuery 在 ASP.NET MVC 3 中使用 BeginCollectionItem 动态添加行到 html 表时的行和列对齐

javascript - 使用 Html.BeginCollectionItem 帮助程序传递集合的分部 View

visual-studio - VS2019中ASP.NET Core 2.2项目中的分析器警告

c# - 未为迁移的 (project.json -> .csproj) asp.net core 应用程序生成 web.config

c# - System.Web.Mvc.HtmlHelper<ModelName> 不包含定义