Getting Checked rows from gridview in asp.net
问题 I have a GridView in ASP.net where I have a CheckBox column. The user can toggle the CheckBox . Now, what I want is that when the user clicks on a button, all the records from the GridView where the CheckBox is checked should be displayed. And on another button, the opposite state should be displayed... I am not getting the logic for the same. Can anyone please help me with the logic.. 回答1: You could iterate through the GridViewRow s and check if the CheckBox is checked using something like