Loading user control when a link is clicked on another user contro

G

Guest

Hi,

I have created a webpage. In that webpage I am loading a user control
into a place holder. The user control has a link button in it. when I click
on that I need to able to load another user control in place of this into a
place holder. I am not knowing how to do that. Could you please let me know.
Or if my design of using user controls in this case is wrong please let me
know the solution so that I could change it.

Thanks,
Sridhar.
 
G

Guest

Following code show how to load a usercontrol:

UserControl ctrl = (UserControl)Page.LoadControl(userControlURL);
placeholder.Controls.Add(ctrl);

HTH

Elton Wang
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top