How to access multiple rows in a gridview
<p>I have a gridiview which gives me a output of 20 members in a list. Now i want to pay salary to only specific person and to only to those persons whose checkbox is checked i tried some thing like this a follows :</p>

<pre><code>protected void Button_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow GVR in GridView.Rows)
        {
            if (GVR.RowType == DataControlRowType.DataRow)
            {
                    CheckBox c = (CheckBox)GVR.FindControl("MemberCheck");
                    if (c.Checked)
                    {

                        string DividendAmount = GridView.Rows[0].Cells[5].Text;
                        string MOP = GridView.Rows[0].Cells[4].Text;
                    }
            }
        }
     }
</code></pre>

<p>But the problem is by this code i can access only any one particular row but what if i have selected n rows ???</p>
