I want to load the user controls dynamically on my page. I can load the control dynamically with the help of following code:
UserControl ctrl =(UserControl) Page.LoadControl(ControlPath);
dvUserControls.Controls.Clear();
dvUserControls.Controls.Add(ctrl);
dvUserControls
is just a div with runat = "server"
My problem is that I have to assign the values to the public properties of the controls also .I can't register my control to the aspx page.
Please advise.
Thanks Rohit