2
Answers

Gridview

Shreyas Tg

Shreyas Tg

9y
265
1
I am storing the value of gridview into a string. I have two lines of code.
string UserName = GridView1.Rows[e.RowIndex].Cells[4].Text.ToString(); 1
string UserName = GridView1.Rows[e.RowIndex].Values["UserName"].ToString(); 2
Both will have same Values. Which is the better option to use 1 or 2 ?
Answers (2)