My below code pulls in 100 items into the checkboxlist all into one column. How can I modify the code so it will appear as two columns? Thanks!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim di As New IO.DirectoryInfo(ImagePath)
Dim imageArray As IO.FileInfo() = di.GetFiles()
Dim image As IO.FileInfo
'list the names of all images in the specified directory
For Each image In imageArray.OrderBy(Function(i) i.Name)
CheckBoxList1.Items.Add(image.Name)
Next
End If
End Sub
Try something like:
<asp:checkboxlist id="CheckBoxList1" runat="server" RepeatLayout="table" RepeatColumns="2" RepeatDirection="vertical"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With