TextBox txt = new TextBox();txt.Id ="txt1";txt.Text="something;PlaceHolder1.Controls.Add( txt); // adding controls dynamically
foreach ( Control ctrl in PlaceHolder1.Controls ){ if ( ctrl is TextBox ) { TextBox txt = (TextBox)ctrl; //accessing values of dynamically created controls string textBoxVal = txt.Text; }}