简体   繁体   English

在ASP.net Core中使用BeginCollectionItem

[英]Using BeginCollectionItem in ASP.net Core

I cannot use BeginCollectionItem by Steve Anderson in asp.net core. 我不能在asp.net核心中使用Steve Anderson的BeginCollectionItem。 I got an error in my partial view when I use 我使用时在部分视图中出错

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

}

The type 'HtmlHelper' is defined in an assembly that is not referenced. “HtmlHelper”类型在未引用的程序集中定义。 You must add a reference to assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 您必须添加对程序集'System.Web.Mvc,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的引用。

is there an alternative way to achieve the functionality of BeginCollectionItem in ASP.net core? 是否有另一种方法可以在ASP.net核心中实现BeginCollectionItem的功能?

I ported the original BeginCollectionItem to work with ASP.Net Core on .Net Core and .Net Framework 4.6+. 我移植了原始的BeginCollectionItem,以便在.Net Core和.Net Framework 4.6+上使用ASP.Net Core。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM