Friday, March 16, 2012

Option Groups in List Boxes

Hi There,

I've been using asp:listboxes for a little while and see that they are very
useful for both DataBinding and adding listitems to.

I was wondering whether anyone knows if its possible to get them to output
<optgroup> tags as well.
I need to group my list items using them, but can't see that any support for
them has been built in.

I know that i generate the select box myself, but then i lose the serverside
functionality.

Thanks.

Ben MannYou could certainly write your own Server Control with this functionality.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Ben Mann" <benmann@.btinternet.com> wrote in message
news:1067860109.22860.0@.damia.uk.clara.net...
> Hi There,
> I've been using asp:listboxes for a little while and see that they are
very
> useful for both DataBinding and adding listitems to.
> I was wondering whether anyone knows if its possible to get them to output
> <optgroup> tags as well.
> I need to group my list items using them, but can't see that any support
for
> them has been built in.
> I know that i generate the select box myself, but then i lose the
serverside
> functionality.
> Thanks.
> Ben Mann
See:

http://www.gotdotnet.com/Community/...09-bfbd51ace4d6

http://www.gotdotnet.com/Community/...e2-db145d1cfeca

Chris

"Ben Mann" <benmann@.btinternet.com> wrote in message
news:1067860109.22860.0@.damia.uk.clara.net...
> Hi There,
> I've been using asp:listboxes for a little while and see that they are
very
> useful for both DataBinding and adding listitems to.
> I was wondering whether anyone knows if its possible to get them to output
> <optgroup> tags as well.
> I need to group my list items using them, but can't see that any support
for
> them has been built in.
> I know that i generate the select box myself, but then i lose the
serverside
> functionality.
> Thanks.
> Ben Mann

0 comments:

Post a Comment