I have this code
@if (ViewBag.TechnologyNames != null) { foreach (var technologyName in ViewBag.TechnologyNames) { if (@technologyName.TechnologyID == -1) { <div class="CheckBoxItem"> <input type="checkbox" name="option1" id="allTechnology" value="@technologyName.TechnologyID" checked="checked" /> @technologyName.Name </div> } else { <input type="checkbox" name="option2" id="tech" value="@technologyName.TechnologyID" /> @technologyName.Name } } }
I need to somehow add @technologyName.TechnologyID
to id="tech"
in order to have at the end
id="tech_123"
How can i do this?
Thanks!
source share