Not able to load web user control dynamically in ASP .Net 2.0

G

Guest

I am not able to load and attach a web user control to a placeholder
dynamically in 2.0 beta.

Do I miss something?

Thanks
 
F

fh

Atul said:
I am not able to load and attach a web user control to a placeholder
dynamically in 2.0 beta.

Do I miss something?

Thanks
toload your UC
instead of
myUc = new myUc();
placehloader.control.add(myUc);

do
myUC = LoadControl("pathToUserWebControl");
placehloader.control.add(myUc);
 
G

Guest

I have tried this but does not work.

Somehow the control will not show up. on the page. I also tried to add to
page but something is missing.
 
G

Guest

Thanks Allen,

Here is my code, it is exactly identical so if you say that it works then
pretty sure something is wrong at my end.

Page.LoadControl(pathtocontrol)
Placeholder.Controls.Add(abovecontrol);

Atul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top