简体   繁体   中英

How can I add items to a list<T> from form input in a controller without using views? ASP.NET MVC C#

I have a list of type

I am generating html in the browser on submit

I need the submitted information to be added to the list

你如何从视图中保存数据而不使用视图问题有点模糊你能不能更具体一点,如果你想将传入的模型/视图数据添加到控制器列表只需初始化列表添加它并进行任何数据操作如果需要根据要求并将其保存为 dB 或根据您的要求。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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