Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi there, this sounds very simple but i can't figure it out. How do you see if a checkbox in a checkboxlist control has been checked.

 

I figured it was something to the effect of me.checkboxlist1.item.selected or checked.

 

i being 0 to me.checkboxlist.items.count in a for loop

 

But I dont see any functions that says if the item is checked or selected

 

Please help

 

Thanks

Posted
me.checkboxlist.CheckedItems.Items(i)
me.checkboxlist.CheckedItems.Count

 

I saw that somewhere else, tried it, but got the msg that says checkeditems is not a member of checkboxlist control

 

:confused:

  • Administrators
Posted

       Dim i As Integer
       For i = 0 To CheckBoxList1.Items.Count
           If Me.CheckBoxList1.Items(i).Value = True Then

           End If
       Next

or similar should do the trick, the above posted code would work for a windows form application, and I take it yours is a asp.net app then.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...