...

View Full Version : Checkboxlist woe



kolotan
08-24-2010, 04:48 PM
Hi all,

in my aspx page i've a checkboxlist code

<asp:CheckBoxList id="checkboxlist1"
AutoPostBack="True"
CellPadding="5"
CellSpacing="5"
RepeatColumns="2"
RepeatDirection="Vertical"
RepeatLayout="Table"
TextAlign="Right"
OnSelectedIndexChanged="Check_Clicked"
runat="server">

<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>

</asp:CheckBoxList>

on design page, it is shown perfectly as
[ ] item1 [ ] item4
[ ] item2 [ ] item5
[ ] item3 [ ] item6

however on runtime it is showing
[ ] [ ]
item1 item4
[ ] [ ]
item2 item5
[ ] [ ]
item3 item6

how to get my runtime page to display like design page layout???

abduraooft
08-25-2010, 08:20 AM
on design page, it is shown perfectly as
[ ] item1 [ ] item4
[ ] item2 [ ] item5
[ ] item3 [ ] item6

however on runtime it is showing
[ ] [ ]
item1 item4
[ ] [ ]
item2 item5
[ ] [ ]
item3 item6 Could you post your html taken from browser's view-source option?

Aubrey Tod
08-25-2010, 10:45 AM
I have a checkListbox that I am filling with data the a user will be able to select 3 values from and then continue with the program. Is there any way to set the maximum number of options that a user can select from the checkboxs list on the actual control, or is there an easy way to do this with code(preferably without javascript and in c#)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum