在ASP.net Core中使用BeginCollectionItem

编程入门 行业动态 更新时间:2024-10-28 03:28:26
本文介绍了在ASP Core中使用BeginCollectionItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我不能在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

本文发布于:2023-11-04 11:24:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557797.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:net   ASP   BeginCollectionItem   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!