After written the blog Loop / iterate through ListView items – ASP.NET (Code sample and Video) (https://chanmingman.wordpress.com/2011/02/12/loop-iterate-through-listview-items-asp-net-code-and-video/) then I realized there are a lot of questions in the C# forum asking how to loop through GridView in ASP.NET.
You replace ListView Control with GridView Control in my previous article then bind to the same Conpetency.cs. The button change to the code below.
protected void Button1_Click(object sender, EventArgs e)
for (int i = 0; i < GridView1.Rows.Count; i++)
string l3 = GridView1.Rows[i].Cells.Text;
string l2 = GridView1.Rows[i].Cells.Text;
string l1 = GridView1.Rows[i].Cells.Text;