i have a checkbox that i'm using the model's company value to see if it should be checked. company value can have more than one company as such: 1,9,10,15
in this case of multiple companies, following statement will never be true.
<input type=checkbox id=drsc class="comp" value="9" data-mini="true" @(Model.company=="9" ? "data-chkd=true" : "") />
so i'm trying to use logic below using the 'contains' clause and it doesn't seem to be working.
<input type=checkbox id=nn class="comp" value="9" data-mini="true" @((Model.company).Contains("9") ? "data-chkd=true" : "") />
if my company field has just company 9, first stmt is working. but not 2nd. any thoughts?
Model.company? It looks like a string, but consider the fact that"10".Contains("1")is true. That looks like it should be anIList<int>.Model.company