结果是复选框列表,但是当我按下鼠标按钮时我无法检查它们,但没有任何反应。有什么帮助吗?
这是我在控制器中的代码
ViewBag.Message = "Select Medias";
var MediaInfo = CampaignManagementService.GetMedias((string)Session["ticket"]);
List<MediaList> items = new List<MediaList>();
foreach (var element in MediaInfo)
{
items.Add(new MediaList() { ID = element.Key, Name = element.Value });
}
ViewData["list"] = items;
这是我的代码
<fieldset>
<legend>@ViewBag.Message</legend>
@{
foreach (var item in ViewData["list"] as List<MediaList>)
{
<div class="form-horizontal well">
<div class="control-group">
<div class="controls">
<div class="checkbox-group">
<div class="adform-checkbox pull-left" tabindex=@item.ID></div>
<label>@item.Name</label>
</div>
<input class="input-small" type="text" id="input">
</div>
</div>
</div>
}
<button type="submit" class="btn btn-success">Create Tag</button>
} </fieldset>