Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-22
8
Medium Priority
?
478 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Expert Comment

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

Author Comment

by:lapucca
ID: 35195865
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 30

Expert Comment

by:anarki_jimbel
ID: 35195867
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 30

Expert Comment

by:anarki_jimbel
ID: 35195877
It depends how you create one control. Yes, just repeat this code to get multiple instances.
0
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 1000 total points
ID: 35195893
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
ID: 35195955
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 1000 total points
ID: 35195957
yes, that will work... that should not be problem
0
 

Author Closing Comment

by:lapucca
ID: 35196038
Thank you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 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