title: Validation of Checkbox in Listview Control by Jquery/Javascript?
body: <p>I am trying to validate the checkbox which is one of the items in ListView control.</p>
  <p>I have the button to check so I define the ClientClick function on the button and wrote JavaScript code.</p>
  <p>But It didn't work.  Display the <code>lstViewtest</code> object <code>null</code>.</p>
  <pre class="lang-js prettyprint-override"><code>    function btnclick() {
          var listview = document.getElementById('&lt;%=
   lstviewtest.FindControl(&quot;tableItem&quot;).ClientID %&gt;');
                  
          for (var i = 0; i &lt; listview.rows.length; i++) {
              var inputs = listview.rows[i].getElementsByTagName('input');
              for (var j = 0; j &lt; inputs.length; j++) {
                  if (inputs[j].type === &quot;checkbox&quot; || inputs[j].type === &quot;checkboxsend&quot;)
                      if (inputs[j].checked)
                          return true;
              }
              alert(&quot;Please select at least one&quot;);
              return false;
          } 
      }
  </code></pre>