Using BeginCollectionItem in ASP.net Core

邮差的信 提交于 2019-11-29 14:03:27

问题


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")) 
{

}

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'.

is there an alternative way to achieve the functionality of BeginCollectionItem in ASP.net core?


回答1:


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



来源:https://stackoverflow.com/questions/38864912/using-begincollectionitem-in-asp-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!