MVC动态生成的表单:表单元素比较多 你就这样写

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");
}

posted @ 2015-06-02 13:01  caijinhao  阅读(300)  评论(0编辑  收藏  举报