How to change text of button inside in grid view
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi I have grid view which contains five rows and one button. By default button’ text is “Add”. Suppose when I click on button of row two. So I want to change text of button from Add to Remove. I have written code like this protected void grdSearchResult_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ((Button)e.Row.FindControl("btnAdd")).Text = "Remove"; } } But this code changes all button text. I want to change only particular button which is clicked.
rajesh