I need to write an inline razor if statement to set selected value of dropdownlist in javascript like this:
$.each(response,
function (key, value) {
$(Banner).append($("<option @(dataUi != null && dataUi.Fk_BannerId == value.Id ? "selected=\"selected\"" : "") value="
+ value.Id + ">"
+ value.Name + "</option>"));
});
but is says can not resolve symbol value how can I use value.Id in this razor if statement?
Aucun commentaire:
Enregistrer un commentaire