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

  • Home
  • SEARCH
  • 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 8554735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:57:01+00:00 2026-06-11T14:57:01+00:00

I have a CheckBoxList which I’m populating with data. When I attempt to retrieve

  • 0

I have a CheckBoxList which I’m populating with data. When I attempt to retrieve the checked items from the list I can only grab the item ordinal, I cannot get the value.

I’ve read that you can use Items[i].Value however when I try to do this I get an error stating that there is no extension method ‘value’.

Here’s the code I’m using to try and grab the information (note the GetItemText(i) actually only gives me the item position, not the text for the item)

   private void btnGO_Click(object sender, EventArgs e)
{
    for (int i = 0; i < chBoxListTables.Items.Count; i++)
    {
        if (chBoxListTables.GetItemChecked(i))
        {
            string str = chBoxListTables.GetItemText(i);
            MessageBox.Show(str);

            //next line invalid extension method
            chBoxListTables.Items[i].value;
        }
    }
}

This is using .Net 4.0

Any thoughts would be appreciated…thanks

  • 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-06-11T14:57:03+00:00Added an answer on June 11, 2026 at 2:57 pm

    This ended up being quite simple. chBoxListTables.Item[i] is a string value, and an explicit convert allowed it to be loaded into a variable.
    The following code works:

    private void btnGO_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < chBoxListTables.Items.Count; i++)
        {
              if (chBoxListTables.GetItemChecked(i))
            {
                string str = (string)chBoxListTables.Items[i];
                MessageBox.Show(str);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a CheckBoxList where users can select multiple items from the list. I
I have a checkbox list which is filled with entries from my database on
I am learning asp.net and needed to have a CheckBoxList which items will be
I have the following sample code which gets a list of values from a
I have a checkboxlist wich contains a list of services loaded from a database
I had data bind checkboxlist to a SQL Server, which display the items in
I have a group checkbook list which i want to preselect from the database
I have a checkboxlist in Popup. I used a selectall checkboxlist items function in
I have the following ViewModel public class RecommendationModel { public List<CheckBoxItem> CheckBoxList { get;
I have a web based program which chooses some records from a database using

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.