Reputation: 6140
I am using *GridView1_RowUpdating* event which is called after clicking "Update" link. In the method I handle updating of the GridView. I want to get the values from textboxes (i.e. new values):
string title= ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].Controls[0]).Text;
But strangely I get old value. I've debugged but couldn't find where the error is.
Also, e.NewValues.Count is 0.
Upvotes: 0
Views: 606
Reputation: 6140
The problem was I was doing GridView.DataBind() everytime in page_load. Solved now.
Upvotes: 1