Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 926053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:37:15+00:00 2026-05-15T19:37:15+00:00

i havea dropdwonlsit (loads on the page_load event) and a unbound CheckBoxList is based

  • 0

i havea dropdwonlsit (loads on the page_load event) and a unbound CheckBoxList is based on the selection from DropDownlist, the checkboxList is display CheckBox (might be one or two or three or any numbers)….. i just want to know after the page is loaded on the browser and user click on the checkbox’s, i need a way to know what checkboxs users have selected… what is the best way of doing that? so far i have come up with this…

 <asp:CheckBoxList AutoPostBack="true" ID="chkbox" runat="server" RepeatColumns="2"      RepeatDirection="Horizontal" RepeatLayout="Table">
                        </asp:CheckBoxList>

  Private Sub chk_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chk.SelectedIndexChanged


        Dim roleCollections As New RoleCollections()
        Dim roleNames As New RoleNames()

        Dim list As New List(Of String)()

        For Each li As ListItem In chk.Items
            'If li.Selected Then 
                'list.Add(li.Value)
            'End If
        Next
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:37:16+00:00Added an answer on May 15, 2026 at 7:37 pm
    For Each checkBoxItem as CheckBoxItem in chkItems
     if checkBoxItem.Checked=true then
        list.add(chckboxItem.Value)
     end if
    Next
    

    Try this instead:

    For i=0 to chkItems.Items.Coult-1
     if chkItems.Items(i).Selected then
       list.add(chkItems.Items(i).Text)
     end if
    next
    

    Here is a link with an example in vb.net or C#:

    http://authors.aspalliance.com/aspxtreme/aspnet/syntax/checkboxlistwebcontrol.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DropDownList in Masterpage that I fill on Page_Load() event but when
I need to dynamically add CheckBoxList on the SelectedIndexChanged event of DropDownList. I have
I have DropDownList with CascadingDropDown extender. If I want to retrieve data from the
I have a dropdownlist inside a gridview, that is loaded from a datasource when
i have a dropdownlist that populates from the sql server database. populating the list
In my code I have a dropdown selection and upon selection from dropdown the
I have a page that runs a jquery onclick event. The event loads an
I have a a generic control called dropdownlist.ascx that populates it's ListItems based on
I want to load a DropDownList with possible Paises from my database. using System;
I have Dropdownlist on my page and its selectedindexchanged method created in code behind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.