Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerable<TextBox> textBoxes = myTextBoxPanel
- .OfType<TextBox>()
- .Where(txt => txt.Id.StartsWith("TextBox"+ ddlDimension.SelectedValue));
- foreach(TextBox txt in textBoxes)
- {
- txt.Text = "You selected Dimension: " + ddlDimension.SelectedItem.Text;
- }
- protected void ddlDimension_SelectedIndexChanged(object sender, EventArgs e){
- for (int i = 1; i < int32.parse(ddlDimension.SelectedValue); i++)
- {
- TextBox txt1 = new TextBox();
- txt1.ID = "txt" + i.ToString();
- this.form1.Controls.AddAt(i, txt1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement