title: get value from checked checkbox inside a gridview using javascript
body: <p>I have gridview control in which column contains checkboxes to select a row and i have also another checkbox in header template for select all rows purpose..</p>
  
  <p>now i want to get value from selected check boxes (all selected or may be 4 to 5 selected checkboxes) using javascript and when user uncheck the selected check box its value should not pass to javascript function or should be empty.</p>
  
  <pre><code> &lt;asp:gridview id="gvFriends" runat="server" autogeneratecolumns="False"&gt;
      &lt;columns&gt;
          &lt;asp:ImageField DataImageUrlField="PictureUrl" HeaderText="Picture" /&gt;
          &lt;asp:BoundField DataField="Name" HeaderText="Name" /&gt;
  
          &lt;asp:TemplateField&gt;
              &lt;HeaderTemplate&gt;
                  &lt;asp:CheckBox ID="chkSelectAll" runat="server" Text="Select All" /&gt;
              &lt;/HeaderTemplate&gt;
              &lt;ItemTemplate&gt;
  
  
    &lt;input id="Checkbox1" type="checkbox" value='&lt;%#Eval("id")%&gt;' /&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
      &lt;/columns&gt;
  &lt;/asp:gridview&gt;
  </code></pre>