Dynamically adding UserControl to list in ASP.NET
- by darja
I have UserControl, which is used for editing fields of some object. I had a page with this control, where user filled the fields, pressed "Submit" and object inserted in DB. And everything was Ok.
But now user wants to insert several objects by one submit. So I need to implement dynamic adding of this control. What is the simpliest way to do it?
The only way I see is to specify "+" button and to create control in its OnClick handler. But it is very dull. I think it is very common issue and there are better variants.