Solved

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

Posted on 2011-03-22
8
457 Views
Last Modified: 2012-05-11
Can I load several instances of a user control, one same control, at run time?  Thank you
0
Comment
Question by:lapucca
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Expert Comment

by:Naman Goel
Comment Utility
why not.... you can put your logic for that... I am not getting your question completely, Please explain.
0
 

Author Comment

by:lapucca
Comment Utility
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.
0
 
LVL 29

Expert Comment

by:anarki_jimbel
Comment Utility
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.
0
 
LVL 29

Expert Comment

by:anarki_jimbel
Comment Utility
It depends how you create one control. Yes, just repeat this code to get multiple instances.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 250 total points
Comment Utility
E.g., how you add buttons:

http://www.aspnettutorials.com/tutorials/controls/control-dym-aspnet2-csharp.aspx

But not sure how you add your controls...
0
 

Author Comment

by:lapucca
Comment Utility
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
0
 
LVL 13

Assisted Solution

by:Naman Goel
Naman Goel earned 250 total points
Comment Utility
yes, that will work... that should not be problem
0
 

Author Closing Comment

by:lapucca
Comment Utility
Thank you
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now