hi there,

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

eg:

<input type="checkbox" id="chkbox11" value="1" onclick="javascript: checkcheck(this);" runat="server">
<input type="checkbox" id="chkbox12" value="2" onclick="javascript: checkcheck(this);" runat="server">
<input type="checkbox" id="chkbox13" value="3" onclick="javascript: checkcheck(this);" runat="server">
<input type="checkbox" id="chkbox14" value="4" onclick="javascript: checkcheck(this);" runat="server">
<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..

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.