c# - How to go about duplicating a panel of controls dynamically? -
i have application has using asp:panel
has 2 labels, 2 link buttons, droplist , textbox collect , display information user. here example:
[panel] [droplist (choose med - fed xml file)/] [label (auto populates med min , max)/] [textbox (user enters quantity)/] [linkbutton(add panel additional item)] [linkbutton(remove current item)] [/panel]
i tried doing duplicating each control individually use of loops , got complicated. there has got alternative doing this other creating ton of panels , making them visible/invisible on link click.
how wish duplicate them? may possible put control within ascx file , declare within web config in following manner
<controls> <add tagprefix="controls" tagname="yourcontrol" src="~/_assets/usercontrols/yourcontrol.ascx /> </controls>
you use control else
<controls:yourcontrol />
if isn't meant please let me know in detail , i'll have look.
edit: after reading post again, seems may wish @ listview control.
Comments
Post a Comment