get value from checked checkbox inside a gridview using javascript

Thodaabnota

New Member
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..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.\[code\] <asp:gridview id="gvFriends" runat="server" autogeneratecolumns="False"> <columns> <asp:ImageField DataImageUrlField="PictureUrl" HeaderText="Picture" /> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:TemplateField> <HeaderTemplate> <asp:CheckBox ID="chkSelectAll" runat="server" Text="Select All" /> </HeaderTemplate> <ItemTemplate> <input id="Checkbox1" type="checkbox" value='http://stackoverflow.com/questions/14561883/<%#Eval("id")%>' /> </ItemTemplate> </asp:TemplateField> </columns></asp:gridview>\[/code\]
 
Back
Top