Creates a
CheckboxList instance which is enumerable. For each interaction you can invoke
CheckboxList.Item() which will correctly render a checkbox input element for the current element on the supplied set (
dataSource
).
The enumerable item will be an element of the dataSource
.
If the
dataSource
elements are complex objects (ie not string or primitives), supply the parameters
value
and
text
to the dictionary to make the helper use the specified properties to extract the
option
value and content respectively.
Usually both the target
and obviously the dataSource
are sets with multiple items. The element types tend to be the same. If they are not, you might have to specify the suffix
parameters on the attributes
as it would not be inferred.