1

How do I specify that I want two columns on a checkboxlist? Below is my code:

    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("\\bk00app0001\Images\")
        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
            CheckBoxList1.Items.Add(image.Name)
        Next
    End If
End Sub

Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDelete.Click

    For count As Integer = 0 To CheckBoxList1.Items.Count - 1
        If CheckBoxList1.Items(count).Selected Then
            File.Delete("\\bk00app0001\Images\" & CheckBoxList1.Items(count).ToString)
            CheckBoxList1.Items.Remove(count)
        End If
    Next

    Response.Redirect("Delete.aspx")

End Sub

1 Answer 1

2

Set CheckBoxList.RepeatDirection and CheckBoxList.RepeatColumns as you require.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.