html - Creating an unordered list with asp.net controls? -


I have found this web control that I'm dynamically adding control but now it is adding an order list Nearby.

I control the controls to control the controls

  Secure Zero Page_load (Object Sender, EventArgs e) {var document = XDocument.Load (@ "Http: // localhost: 49,179 / XML / Templatek.xml"); Var Builder = Object Feature. Get Instance & lt; IControlBuilder & gt; (); Var control = builder.BuildControls (document); Control.ToList () ForEach (c => Controls.Add (c)); }  

And this is html + aspnet ctrls that I want to create:

   

How do I control list items? Do I need a different approach to this problem?

Change this line:

  controls.ToList () (C => Add Control (C));  

For these lines:

  control ol = new HtmlGenericControl ("ol"); Control. Toolist () (C = & gt; ol.Controls.Add (New HtmlGenericControl ("li"). Controls.Add (c))); Controls.Add (OL);  

Edit:

  Control ol = new HtmlGenericControl ("ol"); Control. Toolist () (C = & gt; {Li Li = New HLL Generic Control ("Li"); Ltd Add Control (C); O.L. Control. Add (Lee);}); Controls.Add (OL);  

Comments