How do I add a user control on page load dynamically in ASP.NET?
I have a div with ID=\"contentData\"
and few controls
// Load the User Control
Control uc = LoadControl("~/MyUserControl.ascx");
// Add the User Control to the Controls collection
Page.Controls.Add(uc);
for more details go thru this link - An Extensive Examination of User Controls http://msdn.microsoft.com/en-us/library/ms972975.aspx
Also do read the use of ~ tidle in .net http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx