I've got a web page that includes a user control. The page represent an order and the user control represents the line items. Since the number of line items can be modified, the user control is programmatically creating an HtmlTable for formating and some associated WebControls for each line. To add a line, I add an empty HtmlRow and the corresponding WebControls to the table. The question is how do I manage state for these programmatically created controls and how can I query their values on post back?
The EnableViewState property is set for all WebControls, but how to find these controls on post back? Is it valid to cache a pointer to a TextBox in session state when creating a page (i.e. will the pointer be valid on post back)? Do I have to save the values of all of the controls into session state?
I've tried using FindControl() using both the ID's I gave and the ones that show up in the page source, but both return null.
View Complete Post