您好,
我创建应用程序的ASP.NET MVC 3
我认为我应该有多个复选框
我有一个模型类和基础上,我产生我认为问题产生多个复选框
这里是我的模型类
public class FormModel
{
public string ID { get; set; }
public int No { get; set; }
public string type { get; set; }
public string value { get; set; }
public string[] Ctype //Multiple Check Boxes
{
get;
set;
}
}
and on View i am using this
<table>
<tr>
<td>Enter ID:</td>
<td> @Html.TextBoxFor(m => m.ID)</td>
</tr>
<tr>
<td>Enter Number of controls wanted:</td>
<td>@Html.TextBoxFor(m => m.No)</td>
</tr>
<tr>
<td>Select type of control:</td>
<td> @Html.DropDownListFor(m => m.type,items)</td>
<td>@Html.CheckBoxFor(m=> m.Ctype)</td>
</tr>
<tr>
<td>Value:</td>
<td>@Html.TextBoxFor(m => m.value)</td>
m is the reference of model class
</tr></table>
问题是在CheckBoxFor产生,它是说,不能隐式转换的String [] BOOL
任何一个可以帮助我在这