Please, see my comment first. I'm not sure what you want to achieve...
If you want to catch first empty row, please use something like that:
Dim bIsEmptyTxtBox AS Boolean = false
Dim iRow As Integer = -1
For i As Integer = 0 To Gridview1.Rows.Count - 1
Dim TextBox1 As TextBox = DirectCast(Me.Gridview1.Rows(i).FindControl("txtAnswer"), TextBox)
If TextBox1.Text.Trim.Length = 0 Then
bIsEmptyTxtBox = True
iRow = i
Exit For
End if
Next i
If bIsEmptyTxtBox Then
Session("i") = iRow
Else
End if
To list all empty rows, you should use
array[
^],
list[
^] or
collection of gridview rows[
^].