title: C# - Finding entries in database and loading user controls dynamically
body: <p>I closely followed the link <a href="https://stackoverflow.com/q/1137781/769091">C# - Correct Way to Load Assembly, Find Class and Call Run() Method</a> and got the code to load classes from assembly dynamically.</p>
  
  <pre><code>             Assembly assembly = Assembly.LoadFile(assemblyName);
               Type type = assembly.GetType(className);
               object objCustomClass = Activator.CreateInstance(type) as object; 
  </code></pre>
  
  <p>where assemblyName &amp; className are got from database</p>
  
  <p>But i need to load usercontrol classes from database . I dont have assembly since user control is in UI itself . How can do this ?</p>
  
  <p><strong>Edit :</strong> 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 ?</p>
  
  <p>Can i create a dll out of all my user controls and load exactly as above code ? </p>