I have an ASP.NET C# web app that has a table dymanically created at run-time. In the table there are a number of dropdowns and textboxes created, depending on the number of Rows in the database.
My question is, how do I access these controls once the page is loaded? Here's some code I used to create them:
// makes the comments textbox and labels as txt[AccountID]
TextBox txt = new TextBox();
txt.TextMode = TextBoxMode.MultiLine;
txt.ID = "txt" + Convert.ToString(thisReader3.GetValue(6));
tcell.BorderColor = Color.FromArgb(215, 215, 255); // light blue
tcell.BorderWidth = 1;
tcell.VerticalAlign = VerticalAlign.Top;
tcell.HorizontalAlign = HorizontalAlign.Right;
tcell.Width = 152;
tcell.Controls.Add(txt);
trow.Cells.Add(tcell);
tblDynamic.Rows.Add(trow);
thisReader3.Read();
Not having a backup on Earth and another on the moon and another on Mars is also a redundancy failure.
Not having a backup in another galaxy is a redundancy failure
How do people work?
You have 1 PC, 1 Laptop and 1 iPhone.
How do you synchronize your photos, videos and documents between 3 different devices? Of course, it's with the cloud, right?
Are you going to use an external SSD to share files between your PC, Laptop and iPhone?
"New" Outlook is not even a mobile app (mobile app has Unified Inbox at least), this is just their web app with an added ability to use email account other than Microsoft's.
Question
wa22guy
I have an ASP.NET C# web app that has a table dymanically created at run-time. In the table there are a number of dropdowns and textboxes created, depending on the number of Rows in the database.
My question is, how do I access these controls once the page is loaded? Here's some code I used to create them:
Link to comment
https://www.neowin.net/forum/topic/337059-aspnet-c-iterate-through-dynamic-controls/Share on other sites
8 answers to this question
Recommended Posts