June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to add a Web control to a Web page at run time and handle its events.
Create a control object, add it to the Controls collection of a container control, and use the AddHandler statement to connect any event handlers. You must create the control after every postback.
You can use a similar technique to add Web controls to a Web page as you would use to add Windows controls to a form, but there are some differences, including:
Dynamically added controls will exist only until the next postback. If you need them, you must re-create them when the page is returned. This requirement does not prevent you from handling their events, however.
Dynamically added controls are not as easy to ...
Read now
Unlock full access