I have the combobox that when selected retrieve data from db and show any data in checkbox. my controller :
public ActionResult GetObisCode(int meterId){
var blobis = new ObisInfoRepository();
var model = new SettingViewModel();
model.obiscode = blobis.Where(m => m.MeterID_FK == meterId).ToList();
return View("PartialSetting",model); }
and my partial view for show checkbox:
foreach (var i in model.obiscode) {
@Html.HiddenFor(it => it[i].ObisInfoID)
@Html.TextBoxFor(it => it[i].ObisInfCode)
@Html.CheckBoxFor(it => it[i].Checkbox)
}
but error in partial view. how to show this?
Aucun commentaire:
Enregistrer un commentaire