c# - How to populate UL from code-behind -
i have ul
in asp.net page:
<ul id="ulo" runat="server"> </ul>
code-behind:
foreach (string wrwg in workgrouplists) { // add each "wrwg" list item `ulo` }
i tried using asp:repeater
populate didn't work.
this work:
foreach (string wrwg in workgrouplists) { htmlgenericcontrol li = new htmlgenericcontrol("li"); li.innertext = wrwg; ulo.controls.add(li); }
Comments
Post a Comment