I have 2 blocks of code, first:
@foreach(var filterName in Model.FilterNames){
<text>
$("#@filterName").combobox({
source:"@(filterName)Autocomplete"
});
</text>
}
second:
@Model.FilterNames.ForEach(filterName => {
<text>
$("#@filterName").combobox({
source:"@(filterName)Autocomplete"
});
</text>
})
The second one does not work. Does anyone know if razor supports this syntax? Or what am I doing wrong?
source
share