How do I get the value of a gridview Cell?
How can I get the value of a gridview cell? I have been trying the code below with no luck. protected void grvExpirations_RowDataBound(object sender, GridViewRowEventArgs e) { int test = Convert.toInt32(e.Row.Cells[5].text; } protected void grvExpirations_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int test = Convert.toInt32(e.Row.Cells[5].Text); } } Rasith protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { string LinkText = (string)System.Web.UI.DataBinder