protected void Page_Load(object sender, EventArgs e)
// This is NOT working. I dont see user control on page
Type type = Type.GetType("TestProject.UserControls.Gender");
Control uc = Page.LoadControl(type,null);
//This is working. I can see user control on page
Control uc1 = Page.LoadControl("~/UserControls/Gender.ascx");
Im trying to load User Control dynamically using LoadControl(Type type, object para) method but its not working. I do not get any exception but i dont see user control render on the page. I have a Default parameterless construction in my user control and i see its get executed when i put break point there. but i dont see user control rendered on my page.
If i use OverLoaded method LoadControl(string VirtualPath) then it works fine.
View Complete Post