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

Popular posts from this blog

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

python - TypeError: start must be a integer -

sql - MySQL Custom calculate views -