ASP.NET Dynamic Controls Placeholder

less than 1 minute read

Haven’t looked at this in any great detail but might be worth returning to:

Problem:

ASP.NET gives a developer the opportunity to programmatically add controls to a web form using ParentControl.Controls.Add(new Control()); However, these controls are not persisted in any way thus having to be recreated for each subsequent request.

Goal:

To create a control that behaves like a placeholder but additionally handles recreating dynamic controls on subsequent requests.

Updated: