Shreyas Tg

Shreyas Tg

  • NA
  • 18
  • 3.1k

Gridview

Oct 21 2015 12:59 AM
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)