unordered list in codebehind

  • Thread starter Thread starter Stoppel
  • Start date Start date
S

Stoppel

Hello,

i need to create a unordered list with listitems in it in my codebehind.
There is not an object in the Framework for that is there?
something like HtmlList or something.

Does anybody created something like this?
I really need your help pretty urgent.

tia

Stoppel
 
Hi,

I don 't quite understand what you want, you can use three approaches:

1- use an ArrayList
2- use a strong typed collection of ListItem
3- use an array

if the above do not help you post some more details about it.


cheers,
 
I think he wants to create an Unordered List <UL /> tag from the codebehind
hence using LiteralControl.

Steve
 
Hi Steve,

Now that I read the post again I think you are right
I haven;t use those in a while so long that I had even forget about them :)

If this is the case then another possible way is using a Repeater.

Cheers,
 
I just use <%=GetList%> where GetList is a function in the code-behind
class. The class returns the necessary HTML.

I think it would be cool to have a control that takes an IList and converts
it to a list. I don't think it would be hard to write, but I haven't got the
energy to try it myself right now.

Jonathan Allen
 
Back
Top