title: Error - 'rows' is not a member of 'string' unsure as to why?
body: <p>I am trying to get a check box in a grid view to set a 1 or 0 (true / false) and I am getting an error with the code behind </p>
  
  <p>rows is not a member of string</p>
  
  <p>this link here: </p>
  
  <pre><code> Dim ID As String = [ID].Rows(dgRow.DataItemIndex).Cells(0).Text
  </code></pre>
  
  <p>I am not sure why, I am a complete newbie to this thing, please go easy, here is my code behind.</p>
  
  <pre><code>Public Sub checkbox_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)       'Handles checkbox.CheckedChanged
      Dim connectionString As String = ConfigurationManager.ConnectionStrings("BusinessSignUpsConnectionString").ConnectionString
  
  
      Dim box As CheckBox = DirectCast(sender, CheckBox)
      Dim tblcell As TableCell = CType(box.Parent, TableCell)
      Dim dgRow As GridViewRow = CType(tblcell.Parent, GridViewRow)
  
      Dim ID As String = [ID].Rows(dgRow.DataItemIndex).Cells(0).Text
  
  
      Dim insertSQL As String
  
      If box.Checked = True Then
          insertSQL = "UPDATE BusinessSignups "
          insertSQL &amp;= "SET contacted=1 "
          insertSQL &amp;= "WHERE [ID]= @ID "
      Else
          insertSQL = "UPDATE BusinessSignups "
          insertSQL &amp;= "SET contacted=0 "
          insertSQL &amp;= "WHERE [ID]= @ID "
      End If
  
      Using con As New SqlConnection(connectionString)
          Dim cmd As New SqlCommand(insertSQL, con)
          cmd.Parameters.AddWithValue("@contacted", contacted)
          Try
              con.Open()
              cmd.ExecuteNonQuery()
          Catch Err As SqlException
              MsgBox("Error", 65584, "Insertion Error")
          End Try
          con.Close()
      End Using
  
  End Sub
  </code></pre>