checkboxlist

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2009
Posts: 3
Reputation: Nuela is an unknown quantity at this point 
Solved Threads: 0
Nuela Nuela is offline Offline
Newbie Poster

checkboxlist

 
0
  #1
Aug 3rd, 2009
hi !
i have made some code for a checkboxlist the items if are selected or not,and then to put them in my database.but im having a problem.even if i select my items they always apears unselected .
  1. Dim ckbox As ListItem
  2.  
  3. For Each ckbox In chbl.Items
  4. If ckbox.Selected = True Then
  5. objBLRegjistrimi.fnbooksubject(txtISBN.Text, chbl.SelectedValue)
  6. End If
  7. Next

'ckbox.selected' never becomes true,so never pass ' objBLRegjistrimi.fnbooksubject(txtISBN.Text, chbl.SelectedValue)'

i don't know why this happens.
thank you
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: checkboxlist

 
0
  #2
Aug 3rd, 2009
Change
If ckbox.Selected = True Then
to
If ckbox.Checked Then
I think that's what you want.

HTH
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: Nuela is an unknown quantity at this point 
Solved Threads: 0
Nuela Nuela is offline Offline
Newbie Poster

Re: checkboxlist

 
0
  #3
Aug 3rd, 2009
Originally Posted by Teme64 View Post
Change
If ckbox.Selected = True Then
to
If ckbox.Checked Then
I think that's what you want.

HTH
thank you but
checked' is not a member of 'System.web.Ui.Webcontrols.checkboxlist'
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 22
Reputation: ema005 is an unknown quantity at this point 
Solved Threads: 4
ema005 ema005 is offline Offline
Newbie Poster

Re: checkboxlist

 
0
  #4
Aug 3rd, 2009
If the applicaion is a web applicaion check to confirm that you are rebinding to the checkboxlist at every postback.
Emmanuel Balogun
Senior .Net Developer
Precise Financial Systems
Lagos-Nigeria.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 22
Reputation: ema005 is an unknown quantity at this point 
Solved Threads: 4
ema005 ema005 is offline Offline
Newbie Poster

Re: checkboxlist

 
0
  #5
Aug 3rd, 2009
sorry i mean you need to confirm that you are not rebinding at every postback.
Emmanuel Balogun
Senior .Net Developer
Precise Financial Systems
Lagos-Nigeria.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: Nuela is an unknown quantity at this point 
Solved Threads: 0
Nuela Nuela is offline Offline
Newbie Poster

Re: checkboxlist

 
0
  #6
Aug 3rd, 2009
yes ,it is a web application.
sorry but what does it mean,because i dont understand what you want to tell me.can you explain me better
thank you
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 22
Reputation: ema005 is an unknown quantity at this point 
Solved Threads: 4
ema005 ema005 is offline Offline
Newbie Poster

Re: checkboxlist

 
0
  #7
Aug 3rd, 2009
If you are binding data to the checkboxlist at the page load and the code doing the binding is not within if not ispostback. The checkboxlist will never be selected.
Emmanuel Balogun
Senior .Net Developer
Precise Financial Systems
Lagos-Nigeria.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC