You can change the text of a GridView Control like this
.aspx
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Button id="Button1" runat="server" Text="Hello World!"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
.cs
foreach (GridViewRow row in GridView1.Rows)
{
if (row.RowType == DataControlRowType.DataRow)
{
Button btn = e.Row.FindControl("Button1") as Button;
btn.Text = "Goodbye World!";
}
}
You can add this cs to any function