How to load a user control dynamically in runtime?



How to load a user control dynamically in runtime?..

Answer / Mohd.asif

To load a UserControl dynamically at runtime, you can use the LoadControl method of the Page class. Here's an example:nnUserControl myControl = (UserControl)Page.LoadControl("~/PathToTheUserControl.ascx");

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

What is multiThreading in .NET?

1 Answers  


How to find methods of a assembly file (not using ILDASM) Reflection

1 Answers  


How ASP .NET different from ASP?

4 Answers  


Major role of CLR for CAS

2 Answers   Infosys,


What is the purpose of IClonable interface in .NET?

1 Answers   Sans Pareil IT Services,


What is Event Bubbling in .NET?

1 Answers   Viscus Infotech,


What is close method? How its different from finalize and dispose?

1 Answers  


What is the procedure to add assemly to gac to make it shared one?

1 Answers  


How will you register com+ services?

1 Answers  


How server form post-back works?

1 Answers  


how we can capture the value in textbox when selectedvluechanged event of gridview is fired

1 Answers  


What is a garbage collector?

1 Answers  


Categories