Question : Change Button Text in Gridview

I have a Gridview that currently has a button. I need to the button to change if a value in the Gridview row is a certain value.

I've posted code to show what I have done so far. Thanks for your help!
1:
2:
3:
4:
5:
6:
7:
8:
if (e.Row.RowType ==  DataControlRowType.DataRow)
            {
                Button btn = (Button)e.Row.FindControl("InactiveBTN");

                if (e.Row.DataItem["Status"] == "Inactive")
                {
                    Button btn = ((Button)(e.Row.Cells[3].Controls[1]));
                    btn.Text = "Activate";

Answer : Change Button Text in Gridview

update yourtable

  set [month]=substring(month_year,1,3)  ,[year]=substr(month_year,5,4)
 where month_year like '___/____'
Random Solutions  
 
programming4us programming4us