Below code will add a dynamic TextBox to the "form1" in webpage, with the id "txtName".protected void Page_Load(object sender, EventArgs e){
if (!Page.IsPostBack){ TextBox tx = new TextBox();tx.ID = "txtName";form1.Controls.Add(tx); }
TextBox tx = new TextBox();tx.ID = "txtName";form1.Controls.Add(tx);
No comments:
Write comments