在 ASP.net Core 中使用 BeginCollectionItem [英] Using BeginCollectionItem in ASP.net Core
问题描述
我无法在 asp.net 核心中使用 Steve Anderson 的 BeginCollectionItem.使用时,我的局部视图出现错误
I cannot use BeginCollectionItem by Steve Anderson in asp.net 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.net core 中实现 BeginCollectionItem 的功能是否有替代方法?
is there an alternative way to achieve the functionality of BeginCollectionItem in ASP.net 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+.
https://www.nuget.org/packages/BeginCollectionItemCore
这篇关于在 ASP.net Core 中使用 BeginCollectionItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!