yes you can but in 2 condition:
first, the controls have to exists in a parent control like parent!
second, you should have their ID!
protected void Page_Load(object sender, EventArgs e)
{
Panel1.Controls.Remove(Button1);
RadioButton rdbtn = new RadioButton();
rdbtn.Checked = false;
rdbtn.ID = "rdbtn";
rdbtn.Text = "your aswer?";
Panel1.Controls.Add(rdbtn);
}
explain of my code:
I have a button in a panel control, and in page_load method i remove button , and
make a new checkbox control , and set it to these values and add this control to panel!