title: Add string values into array list after looping through gridview rows c#
body: <p>I am using a gridview with bulk update. After I make changes to the column and hit update button in the page, then this foreach loop is executed to update. Now how can I add these string values to arraylist after looping</p>
  
  <pre><code>protected void btnUpdate_Click(object sender, EventArgs e)
  {
      try
      {
          foreach (GridViewRow row in gvDetails.Rows)
          {
             string strID = ((Label)row.FindControl("lblID")).Text;
             string strGroup = ((Label)row.FindControl("lblGrp")).Text;
             string strValue = ((TextBox)row.FindControl("txtValue")).Text;     
          }
          ArrayList alList = new ArrayList();
          alList.Add(strID);
          alList.Add(strGroup);
          alList.Add(strValue);
      }
      catch (Exception ex)
      {
  
      }
  }
  </code></pre>
  
  <p>But the values of the string after looping is not getting inserted into arraylist. Van anyone help me through this.</p>