Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CheckBoxList not saving selected state

Status
Not open for further replies.

AHint

Programmer
Sep 12, 2003
20
GB
I have a checkboxlist that when I am subsequently interorgating to check selected status is not keeping the status of the control.

I'm sure it must be something simple that I have forgotten to select but can't see it anywhere. I have made sure that enableviewstate is set to true.

Any help gratefully received!
 
I also have this problem. My code is:

For i = 0 To Me.chkTopPages.Items.Count - 1
If Me.chkTopPages.Items(i).Selected Then

With myCmd
'do something ....
End With
End If
Next

The changed 'checked' value is not being picked up.
Any help will be appreciated.
 
Sorted it - and do I feel a fool!

Wasn't checking for postback, so every time it hits the server the PageLoad event happens first, repopulating the checkboxlist, THEN the event for the save happens.

Doh!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top