Adding more than text to a CheckBoxList

N

Nathan Sokalski

I have a CheckBoxList and I want more than just text in some of the items.
However, because the ListItem, which is used to add the CheckBoxes, does not
allow child controls, I cannot find a way to do this. Any ideas? Thanks.
 
G

Gregory A. Beamer

Nathan Sokalski said:
I have a CheckBoxList and I want more than just text in some of the items.
However, because the ListItem, which is used to add the CheckBoxes, does
not allow child controls, I cannot find a way to do this. Any ideas?
Thanks.

I can think of a few ways. One is to use a control like a Repeater that
gives you full control of the HTML output and can be altered with each item
quite easily. This is by taking control of the binding. Another option,
perhaps, is to change the style and use CSS to deliver the other content
(images?).


--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
N

Nathan Sokalski

Interesting ideas, but unfortunately neither one will work. The Repeater
would not work in my situation because I am not using DataBinding for the
CheckBoxList, and the Repeater does not have the built-in properties for
dealing with checkboxes that I like about the CheckBoxList. CSS will not
work because there is no way to get the child controls into the ListItem,
which means that in the generated HTML, the controls that I wanted to make
child controls are outside of the table that the CheckBoxList generates
(therefore, the "child" controls aren't really children at all). And without
the "child" controls inside the same td tag as the generated input and label
tag, CSS becomes pretty useless as far as putting the "child" controls where
I want. Any other ideas?
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top