I have below code to add int n into Textbox from Textboxlist, but when running this program, both textboxes dont have anything. Thanks in advance for any suggestion
- private void btnLoad_Click(object sender, RoutedEventArgs e)
- {
- List<TextBox> IDtextBoxList = new List<TextBox>();
- IDtextBoxList.Add(new TextBox { Text = txtboxpbM1.Text });
- IDtextBoxList.Add(new TextBox { Text = txtboxpbM2.Text });
- for (int n = 0; n < IDtextBoxList.Count; n++)
- {
- IDtextBoxList[n].Text = n.ToString();
- }
- }