Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

Can I load multiple instances of a user control at run time?

Can I load several instances of a user control, one same control, at run time?  Thank you
Avatar of Naman Goel
Naman Goel
Flag of India image

why not.... you can put your logic for that... I am not getting your question completely, Please explain.
Avatar of lapucca
lapucca

ASKER

I think you might have answer my question.  I just want to know if I can create multiple instances of a same user control?  How would i do that?  Just use loadControl() for the number of the same user control i want?  Thanks.
Yes, more details would be helpful.

I also can't see any limitations, unless you did some tricks like "singleton" :)

User control is just a control, like any other controls (buttons, text boxes etc), and nothing should stop to create a number of same controls.

However, showing some code or giving more details would clarify the issue.
It depends how you create one control. Yes, just repeat this code to get multiple instances.
ASKER CERTIFIED SOLUTION
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

I find out at run time about how many of this user control i need to have on the page so I gess i would use LoadControl(); in a loop
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

Thank you