1.Declare public variables static DropDownList[] drp_arr; static int drp_count; 2.Write methods to develop dynamic controls protected void add_dropdown(DropDownList drp) { try { //add to a container on the page pnltitle.Controls.Add(drp); //add a spacer after the control pnltitle.Controls.Add(new LiteralControl(“<br><br>”)); } catch (Exception ex) { } } private void createdropdown() { try { for (int i = …
Tag: creating dynamic controls in asp.net
Permanent link to this article: https://blog.openshell.in/2011/02/adding-dynamic-controls-in-asp-net/