Checked box value not retained in code behind
<p>I have gridview with checkbox column and one Select all checkbox outside the gridview. I have used javascript to check all checkbox within the grid  when Select all checkbox is checked.
I am able to check and uncheck all checkbox of gridview. But while  i click save button the states of all those checkbox within the grid is false so that i could not save the datas.</p>

<p>Code i have used:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function SelectAllCheckboxes(chk) {
        $('#&lt;%=grvmembers.ClientID %&gt;').find("input:checkbox").each(function () {
            if (this != chk) {
                this.checked = chk.checked;
            }

        });
&lt;/script&gt;
</code></pre>

<p></p>
