protected void btnSet_Click(object sender, EventArgs e) { CheckBox chkBx = new CheckBox(); chkBx.ID = "chk1"; appentDiv.Controls.Add(chkBx); } protected void btnGet_Click(object sender, EventArgs e) { CheckBox n = this.appentDiv.FindControl("chk1") as CheckBox; }
protected void btnGet_Click(object sender, EventArgs e) { CheckBox n = (CheckBox)this.appentDiv.FindControl("chk1") ; }
this.appentDiv.FindControl("chk1") as CheckBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)