Asp.net mvc 如何在MVC asp.net中一次在表中插入多行?

Asp.net mvc 如何在MVC asp.net中一次在表中插入多行?,asp.net-mvc,Asp.net Mvc,我是MVC asp.net的新手 我有一个正在添加行的网格 现在我想在一个表中同时执行多行插入。 我该怎么做呢。因此,将在MVC中添加多行 任何帮助都会被拒绝 您想学习如何将模型绑定到集合。对于这种技术,这里已经有很多答案 你是说像这样的事吗 <table class="table" style="vertical-align: middle;"> <thead>

我是MVC asp.net的新手

我有一个正在添加行的网格

现在我想在一个表中同时执行多行插入。 我该怎么做呢。因此,将在MVC中添加多行


任何帮助都会被拒绝

您想学习如何将模型绑定到集合。对于这种技术,这里已经有很多答案


你是说像这样的事吗

 <table class="table" style="vertical-align: middle;">
                <thead>
                    <tr>
                        <th>
                            @Html.DisplayNameFor(model => model.title)
                        </th>
                        <th style="text-align: center;">
                            @Html.DisplayNameFor(model => model.imgAr)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.created)
                        </th>
                        <th></th>
                    </tr>
                </thead>
                <tbody id="tblOfContent">
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.title)
                            </td>
                            <td style="text-align: center;">
                                <img src="~/newsImages/@item.imgAr" class="img-thumbnail" />
                            </td>
                            <td>
                                @item.created.ToShortDateString()
                            </td>
                            <td>
                                @Html.ActionLink("Details", "Edit", new { id = item.id }) |
                                @Html.ActionLink("Details", "Details", new { id = item.id }) 
                            </td>
                        </tr>
                    }
                </tbody>
            </table>

当你说网格时,你指的是什么?第三方,或扩展,或只是一个表,具体是什么?可能的重复
    public ActionResult Index()
    {
        return View(newsService.GetAll().OrderByDescending(x => x.created));
    }