【发布时间】:2012-12-23 10:11:17
【问题描述】:
我有以下看法:-
@model IEnumerable<MvcApplication4.Models.customers>
@{
ViewBag.Title = "customer";
}
<h3>Avialble cusotmer</h3>
<table id ="avilalbe">
<tr>
<th>
@Html.CheckBox("ORG_NAME ", true) NAME
</th>
<th>
@Html.CheckBox("description ", true) Description
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.customer_NAME)
</td>
<td>
@Html.DisplayFor(modelItem => item.description)
</td>
</tr>
}
<a href=""> Extract To Excel </a>
如何根据用户从复选框中的选择将模型数据提取到 .csv 中(包括名称和描述列或仅包括其中之一)。
【问题讨论】:
-
那么问题出在哪里?您不知道如何在服务器端获取复选框值或者您不知道如何创建 .csv 文件?
-
不需要在服务器上设置复选框,但我不知道如何根据复选框状态创建 .csv 文件?谢谢
标签: javascript jquery asp.net asp.net-mvc asp.net-mvc-3