title: Why does compiling this code result in a syntax error?
body: <p>I wrote the following code but i am getting the error as i mentioned can any one tell</p>
  
  <pre><code>protected void btnGenerate_Click(object sender, EventArgs e)
  {
      DataRow[] dRow;
      DataTable dt = new DataTable();
      foreach (GridViewRow grRow in grdACH.Rows)
      {
          CheckBox chkItem = (CheckBox)grRow.FindControl("checkRec");
          if (chkItem.Checked)
          {
              chkItm = true;
              chkcnt++;
              strBankTypeID = ((Label)grRow.FindControl("lblBankType")).Text.ToString();
              strBnkArray.Append(strBankTypeID);
              strBnkArray.Append(",");
          }
      }
      oEmpDeposits.getEmpDepositDetails(out local_ds, strFedTaxId, PayperiodNumber, PayrollYear, strPayFreqType);
  
  for (int i = 0; i &lt; local_ds.Tables[0].Rows.Count; i++)
      {
          string strTrim = strBnkArray.ToString().TrimEnd(',');
          strTrim = "BankAccountTypeID='" + strTrim[i] + "'";
          if (strTrim.Contains("BankAccountTypeID=',"))
          {
              strTrim = "BankAccountTypeID='" + strTrim[i] + "'";
          }
  
          dRow = local_ds.Tables[0].Select(strTrim);
      }
  }
  </code></pre>