How do i reset values of dynamically created controls on ASP .NET c# page?
- by Euclid
i have an array of buttons added to a panel control and need to reset them to their original values, is this possible pragmatically?
protected void Page_Load(object sender, EventArgs e)
{
RenderTable();
}
private void RenderTable()
{
Button[] board = new Button[9];
for(int i =0; i <board.Length; i++)
{
board[i] = new Button();
board[i].Text = " ";
board[i].Width= board[i].Height = 50;
board[i].Click += PlayerClick;
board[i].ID = "pos" + i;
Panel1.Controls.Add(board[i]);
}
}