Gridview :: Loop Data
For Each crow As GridViewRow In Gridview1.Rows
If crow.RowType = DataControlRowType.DataRow Then
' ## For Template Field.
Dim txt1 As TextBox = crow.FindControl("txt1")
Response.Write(txt1.Text)
' ## For Bound Field.
Dim x As String = crow.Cells(0).Text
Response.Write(x)
End If
Next
If crow.RowType = DataControlRowType.DataRow Then
' ## For Template Field.
Dim txt1 As TextBox = crow.FindControl("txt1")
Response.Write(txt1.Text)
' ## For Bound Field.
Dim x As String = crow.Cells(0).Text
Response.Write(x)
End If
Next
Comments
Post a Comment