问题描述
我有一个名为List< place>属性的模型
地方有类似
地名的属性,
placedescription
现在我有两个文本框来输入地名和描述,之后我点击添加按钮,这些数据插入到jquery的Add按钮下方的表格中。因此,表格行正在增加。
< table id =tblPlacelist>
< thead>
< tr>
< th>地名< / th>
< th>地点描述< / th>
< / tr>
< / thead>
< tbody>< / tbody>
< / table>
现在问题是,如何将表格行数据作为列表传递?
我采取了部分剃刀视图和列表< place>在视图上方声明。
我尝试过:
与上述相同的问题。
I have a model with property named List<place>
place has property like
placename,
placedescription
now I have two textboxes to enter placename and description, after that I'm clicking add button and those data inserted in a table tbody just below the Add button by jquery. So table row is increasing.
<table id="tblPlacelist"> <thead> <tr> <th>Place Name</th> <th>Place Description</th> </tr> </thead> <tbody></tbody> </table>
Now the thing is, how can I pass the table row data as list?
I have taken a partial razor view and the list<place> declared above of the view.
What I have tried:
The same problem what described above.
这篇关于如何将表数据传递给MVC中的控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!