create '<UL>' lists

D

Dionísio Monteiro

Hi there,

Can I programatically create <UL> lists?
What I mean is, I can create a table programatically, like this:
------------------------------
Table tb = new Table();
Row r = new TableRow();
Cell c = new TableCell();
------------------------------

Can I do something similar to create <UL> lists?

Thanx?
Dionísio
 
R

Raterus

You can make any tag you want with the HtmlGenericControl, and then setting
the TagName property after you instantiate it. Then you can add other
controls, or text to it.
 
C

Curt_C [MVP]

use a generic string object, pass all the html tags into it.
I don't believe there is any UL "control"
 
B

bruce barker

there is no builtin ul, so you use the generic

HtmlGenericControl ul = new HtmlGenericControl("ul");
HtmlGenericControl li = new HtmlGenericControl("li");

li.InnerText = "list 1";
ul.Controls.Add(li);


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top