Use Reflection to load User Control from “text” value
Following is an exmpale of using reflection in .net to load user control in current assembly based on some text value provided. “CATUI.CATUserControls.ucMetadataProfiles” full identifier of the usercontrol Type theType = Assembly.GetExecutingAssembly().GetType(“CATUI.CATUserControls.ucMetadataProfiles”); if (theType != null) { Object newObj = Activator.CreateInstance(theType); splitContainerMain.Panel2.Controls.Add((UserControl)newObj); }
More »
This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from.