MVC动态生成的表单:表单元素比较多 你就这样写:
public ActionResult ShoudaanActionResult(FormCollection from,T_UserM user)
{
List<string> daan = new List<string>();
for (int i = 4; i < from.Count; i++)
{
daan.Add(from[i].ToString());
}
QSAcceptAnswer qaa = new QSAcceptAnswer();
//插入答案表
qaa.insertQSUserAnswer(daan);
qaa.qsGuid = preItem.T_qsGuid;
//插入基本调查用户信息
qaa.insertUserTable(user);
return RedirectToAction("SuccessActionResult");
}
时间: 2024-10-06 18:09:25