How to transfer PostBack data to dynamically added UserControl (.NET)?
I have a panel on my page:
<asp:Panel ID="pnlTest" runat="server" /> Then I dynamically add a TextBox to it on the_Load page:
TextBox simpleTextBox = new TextBox(); pnlTest.Controls.Add(simpleTextBox); simpleTextBox.ID = "SimpleTextBox-1"; Is there a way to extract the information entered into this TextBox without pulling it directly from Request.Form? I thought I could do something like this after adding it again:
lblPresentResults.Text = myTextBox.Text; I know this example seems far-fetched, but I decided that I would try to eliminate all other variables in my particular application, especially to ask a question here.