Resize an asp.net panel width based on a checkboxlist?
Posted
by larryq
on Stack Overflow
See other posts from Stack Overflow
or by larryq
Published on 2010-05-05T18:02:24Z
Indexed on
2010/05/05
18:08 UTC
Read the original article
Hit count: 302
Hi everyone,
I have an asp.net panel that contains a checkboxlist. I'd like to resize it so that its width fits the list's contents snugly.
Right now I'm handling the panel's pre rendering event, setting its width to match that of the checkboxlist. However it appears the checkboxlist's width property reads zero (at least in this pre render method) so the panel's width is set identically, which leads to inconsistent renderings in Firefox vs IE. Does anyone have a better approach to doing what I'm attempting here? Many thanks.
© Stack Overflow or respective owner