I closely followed the link C# - Correct Way to Load Assembly, Find Class and Call Run() Method and got the code to load classes from assembly dynamically.
Assembly assembly = Assembly.LoadFile(assemblyName);
Type type = assembly.GetType(className);
object objCustomClass = Activator.CreateInstance(type) as object;
where assemblyName & className are got from database
But i need to load usercontrol classes from database . I dont have assembly since user control is in UI itself . How can do this ?
Edit : I am changing my question a bit . Now i am storing user control file in some other location may be in blob storage or some other place. ( not in my project work space ) and i store the url of the user control in database . Now how can load this usercontrol to my web page ?
Can i create a dll out of all my user controls and load exactly as above code ?