how to loop thru checked checkbox to retrieve its value?!?

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

Join Date: Jul 2005
Posts: 41
Reputation: ohgosh is an unknown quantity at this point 
Solved Threads: 0
ohgosh's Avatar
ohgosh ohgosh is offline Offline
Light Poster

how to loop thru checked checkbox to retrieve its value?!?

 
0
  #1
Jan 25th, 2006
hi there,

i am doing asp.net and had many sets of checkbox which is html checkbox and not asp checkbox.

eg:
  1. <input type="checkbox" id="chkbox11" value="1" onclick="javascript: checkcheck(this);" runat="server">
  2. <input type="checkbox" id="chkbox12" value="2" onclick="javascript: checkcheck(this);" runat="server">
  3. <input type="checkbox" id="chkbox13" value="3" onclick="javascript: checkcheck(this);" runat="server">
  4. <input type="checkbox" id="chkbox14" value="4" onclick="javascript: checkcheck(this);" runat="server">
  5. <input type="checkbox" id="chkbox15" value="5" onclick="javascript: checkcheck(this);" runat="server">

in my code behind, how do i insert a loop to loop through the checked checkbox and retrieve the value?

thanks in advance..
cheers,
ohgosh
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: how to loop thru checked checkbox to retrieve its value?!?

 
0
  #2
Jan 25th, 2006
Why not use the checkbox list control? This automatically places them in an array (which is your other option with normal checkboxes) so you can loop through them
Reply With Quote Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC