How to dynamically checked checkbox based on database value which are present or not null
@foreach (abc.Models.xyz entry in entrydetails)
{
<div style="height:auto !important;max-height:160px; overflow-y:auto;width:79%;">
@{
List<abc.Models.Singer> singerobjlist = abc.Service.Class1.singerlist();
}
@foreach (abc.Models.Singer singerobj in singerobjlist)
{
<div class="boxcheck">
<input type="checkbox" value='@singerobj.Singer1' name="Singer1l"/>
<label>@singerobj.Singer1</label>
</div>
}
</div>
}
Dear All... I have declared foreach loop at the top which contain all entry in database corresponding to singer1-singer7. Now below foreach loop I have declared another foreach loop which will dynamically display all singer name in view page. I want to do that all those singer whose not null in outer foreach loop that singer name must be checked by inner foreach loop.