Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 760.1k

GridView Cell value cannot fetch

Jun 17 2016 7:56 AM
Sir,
 
I am in a ASP.NET project. I stuck in code piece to fetch GridView cell value into a variable.  Data being fetched from database in page load(if !PostBack). then all cell value become null when come to the RowCommand event. why that happening?
 
 
Here the code:-
int EmpID = Convert.ToInt32(((GridViewRow)(((LinkButton)e.CommandSource).NamingContainer)).Cells[1].Text); 

Answers (2)