0

I have a survey generator, that can have several sets of checkboxes. I was planning to generate them so they have names like this:

<input type="checkbox" id="5_5_c" name="[0].isChecked"/>

This way I can accept a model like: List where CheckTypeQuestion has a List amongst other things.

The problem I have, is that my approach would not differentiate checkboxes from different questions. It would at best, collect them all in one big list.

What is the best way of doing this? Any ideas are appreciated.

4

1 回答 1

0

我过去是如何做到这一点的,是在控制器上做一个

var List = Request.Form["Name"].ToString();

它将包含使用该匹配名称检查的所有复选框的列表。希望这会有所帮助

于 2013-10-15T22:46:43.263 回答