Connecting Tech Pros Worldwide Help | Site Map

Dynamic Controls in ASP.NET

CITI_Cam
Guest
 
Posts: n/a
#1: Jul 21 '05
Main problems: my dynamically created controls are inaccessible after
postback. I want to capture user entered values from these dynamically
created controls, but the controls disappear after clicking my input button.
I initially tried to use a panel, but I could not seem to control the
placement of the controls in the panel (any help on controlling placement in
a panel would also be appreciated). I have now tried to use a table, but I
am unable to reference the controls within the table. Any help would be
appreciated.
Joshua Flanagan
Guest
 
Posts: n/a
#2: Jul 21 '05

re: Dynamic Controls in ASP.NET


You need to re-create the controls in the Page Init event on every page
load. If the controls are not re-created before the viewstate is
loaded, they won't be populated with their data.

CITI_Cam wrote:[color=blue]
> Main problems: my dynamically created controls are inaccessible after
> postback. I want to capture user entered values from these dynamically
> created controls, but the controls disappear after clicking my input button.
> I initially tried to use a panel, but I could not seem to control the
> placement of the controls in the panel (any help on controlling placement in
> a panel would also be appreciated). I have now tried to use a table, but I
> am unable to reference the controls within the table. Any help would be
> appreciated.[/color]
Closed Thread